Merged r2750 from trunk.
This commit is contained in:
parent
4fe29a2cf5
commit
e35e794b50
9 changed files with 147 additions and 42 deletions
|
@ -30,13 +30,13 @@
|
|||
<xsl:param name="vim-lang" select="1"/>
|
||||
|
||||
<!-- Time zone -->
|
||||
<xsl:param name="timezone" select="America/Toronto"/>
|
||||
<xsl:param name="timezone" select="GMT"/>
|
||||
|
||||
<!-- Page size -->
|
||||
<xsl:param name="page" select="letter"/>
|
||||
|
||||
<!-- Locale settings -->
|
||||
<xsl:param name="lang" select="en_CA"/>
|
||||
<xsl:param name="lang" select="C"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="//sect1"/>
|
||||
|
@ -120,7 +120,7 @@
|
|||
<xsl:value-of select="substring-before(string(),'make')"/>
|
||||
<xsl:text>make -k</xsl:text>
|
||||
<xsl:value-of select="substring-after(string(),'make')"/>
|
||||
<xsl:text> || true
</xsl:text>
|
||||
<xsl:text> >> $TEST_LOG 2>&1 || true
</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
|
@ -165,27 +165,35 @@
|
|||
<!-- No interactive commands are needed if the .config file is the proper one -->
|
||||
<xsl:when test="contains(string(),'menuconfig')"/>
|
||||
<!-- The Coreutils and Module-Init-Tools test suites are optional -->
|
||||
<xsl:when test="($testsuite = '0' or $testsuite = '1') and
|
||||
(ancestor::sect1[@id='ch-system-coreutils'] or
|
||||
<xsl:when test="(ancestor::sect1[@id='ch-system-coreutils'] or
|
||||
ancestor::sect1[@id='ch-system-module-init-tools']) and
|
||||
(contains(string(),'check') or
|
||||
contains(string(),'dummy'))"/>
|
||||
contains(string(),'dummy'))">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$testsuite = '0' or $testsuite = '1'"/>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates/>
|
||||
<xsl:if test="contains(string(),'check')">
|
||||
<xsl:text> >> $TEST_LOG 2>&1 || true</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>
</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<!-- Fixing toolchain test suites run -->
|
||||
<xsl:when test="string() = 'make check' or
|
||||
string() = 'make -k check'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$testsuite != '0'">
|
||||
<xsl:text>make -k check || true
</xsl:text>
|
||||
<xsl:text>make -k check >> $TEST_LOG 2>&1 || true
</xsl:text>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="contains(string(),'glibc-check-log')">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$testsuite != '0'">
|
||||
<xsl:value-of select="substring-before(string(),';')"/>
|
||||
<xsl:text> || true
</xsl:text>
|
||||
<xsl:value-of select="substring-after(string(),';')"/>
|
||||
<xsl:text>
</xsl:text>
|
||||
<xsl:value-of select="substring-before(string(),'>g')"/>
|
||||
<xsl:text>>> $TEST_LOG 2>&1 || true
</xsl:text>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
|
@ -194,6 +202,9 @@
|
|||
<xsl:choose>
|
||||
<xsl:when test="$testsuite != '0'">
|
||||
<xsl:apply-templates/>
|
||||
<xsl:if test="contains(string(),'test_summary')">
|
||||
<xsl:text> >> $TEST_LOG</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>
</xsl:text>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
|
|
|
@ -542,6 +542,16 @@ final_system_Makefiles() { #
|
|||
if [ "$vrs" != "" ] ; then
|
||||
FILE="$name-$vrs.tar.*"
|
||||
wrt_unpack2 "$FILE"
|
||||
# If the testsuites must be run, initialize the log file
|
||||
case $name in
|
||||
binutils | gcc | glibc )
|
||||
[[ "$TEST" != "0" ]] && wrt_test_log2 "${this_script}"
|
||||
;;
|
||||
* )
|
||||
[[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && wrt_test_log2 "${this_script}"
|
||||
;;
|
||||
esac
|
||||
# If using optimizations, write the instructions
|
||||
[[ "$OPTIMIZE" != "0" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
|
||||
fi
|
||||
#
|
||||
|
@ -645,6 +655,16 @@ bm_final_system_Makefiles() { #
|
|||
if [ "$vrs" != "" ] ; then
|
||||
FILE="$name-$vrs.tar.*"
|
||||
wrt_unpack3 "$FILE"
|
||||
# If the testsuites must be run, initialize the log file
|
||||
case $name in
|
||||
binutils | gcc | glibc )
|
||||
[[ "$TEST" != "0" ]] && wrt_test_log2 "${this_script}"
|
||||
;;
|
||||
* )
|
||||
[[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && wrt_test_log2 "${this_script}"
|
||||
;;
|
||||
esac
|
||||
# If using optimizations, write the instructions
|
||||
[[ "$OPTIMIZE" != "0" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
|
||||
fi
|
||||
#
|
||||
|
|
|
@ -30,14 +30,14 @@
|
|||
<xsl:param name="testsuite" select="1"/>
|
||||
|
||||
<!-- Time zone -->
|
||||
<xsl:param name="timezone" select="America/Toronto"/>
|
||||
<xsl:param name="timezone" select="GMT"/>
|
||||
|
||||
<!-- Page size -->
|
||||
<xsl:param name="page" select="letter"/>
|
||||
|
||||
<!-- Locale settings -->
|
||||
<xsl:param name="lang" select="en_CA"/>
|
||||
<xsl:param name="lc_all" select="en_CA"/>
|
||||
<xsl:param name="lang" select="C"/>
|
||||
<xsl:param name="lc_all" select="C"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="//sect1"/>
|
||||
|
@ -144,13 +144,13 @@
|
|||
$testsuite = '3')">
|
||||
<xsl:choose>
|
||||
<xsl:when test="ancestor::sect1[@id='ch-system-gcc']">
|
||||
<xsl:text>make -k check || true
</xsl:text>
|
||||
<xsl:text>make -k check >> $TEST_LOG 2>&1 || true
</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="substring-before(string(),'make')"/>
|
||||
<xsl:text>make -k</xsl:text>
|
||||
<xsl:value-of select="substring-after(string(),'make')"/>
|
||||
<xsl:text> || true
</xsl:text>
|
||||
<xsl:text> >> $TEST_LOG 2>&1 || true
</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:if>
|
||||
|
@ -211,12 +211,22 @@
|
|||
<xsl:text>
</xsl:text>
|
||||
</xsl:when>
|
||||
<!-- The Coreutils and Module-Init-Tools test suites are optional -->
|
||||
<xsl:when test="($testsuite = '0' or $testsuite = '1') and
|
||||
(ancestor::sect1[@id='ch-system-coreutils'] or
|
||||
<xsl:when test="(ancestor::sect1[@id='ch-system-coreutils'] or
|
||||
ancestor::sect1[@id='ch-system-module-init-tools']) and
|
||||
(contains(string(),'check') or
|
||||
contains(string(),'distclean') or
|
||||
contains(string(),'dummy'))"/>
|
||||
contains(string(),'dummy'))">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$testsuite = '0' or $testsuite = '1'"/>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates/>
|
||||
<xsl:if test="contains(string(),'check')">
|
||||
<xsl:text> >> $TEST_LOG 2>&1 || true</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>
</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<!-- Fixing toolchain test suites run -->
|
||||
<xsl:when test="string() = 'make check' or
|
||||
string() = 'make -k check'">
|
||||
|
@ -224,8 +234,7 @@
|
|||
<xsl:when test="(($testsuite = '1' or $testsuite = '2') and
|
||||
ancestor::chapter[@id='chapter-building-system']) or
|
||||
$testsuite = '3'">
|
||||
<xsl:text>make -k check || true</xsl:text>
|
||||
<xsl:text>
</xsl:text>
|
||||
<xsl:text>make -k check >> $TEST_LOG 2>&1 || true
</xsl:text>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
|
@ -234,7 +243,7 @@
|
|||
<xsl:choose>
|
||||
<xsl:when test="$testsuite != '0'">
|
||||
<xsl:value-of select="substring-before(string(),'make check')"/>
|
||||
<xsl:text>make -k check || true
</xsl:text>
|
||||
<xsl:text>make -k check >> $TEST_LOG 2>&1 || true
</xsl:text>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
|
|
|
@ -143,10 +143,13 @@ chapter5_Makefiles() { # Bootstrap or temptools phase
|
|||
# Insert instructions for unpacking the package and to set the PKGDIR variable.
|
||||
case $this_script in
|
||||
*binutils* )
|
||||
wrt_unpack "$FILE" 1 ;; # Do not delete an existing package directories
|
||||
*)
|
||||
wrt_unpack "$FILE" ;;
|
||||
wrt_unpack "$FILE" 1 ;; # Do not delete an existing package directories
|
||||
*)
|
||||
wrt_unpack "$FILE" ;;
|
||||
esac
|
||||
# If the testsuites must be run, initialize the log file
|
||||
[[ "$TEST" = "3" ]] && wrt_test_log "${this_script}"
|
||||
# If using optimizations, write the instructions
|
||||
[[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
|
||||
fi
|
||||
|
||||
|
@ -314,6 +317,16 @@ chapter6_Makefiles() { # sysroot or chroot build phase
|
|||
esac
|
||||
wrt_unpack2 "$FILE"
|
||||
wrt_target_vars
|
||||
# If the testsuites must be run, initialize the log file
|
||||
case $name in
|
||||
binutils | gcc | glibc )
|
||||
[[ "$TEST" != "0" ]] && wrt_test_log2 "${this_script}"
|
||||
;;
|
||||
* )
|
||||
[[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && wrt_test_log2 "${this_script}"
|
||||
;;
|
||||
esac
|
||||
# If using optimizations, write the instructions
|
||||
[[ "$OPTIMIZE" != "0" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
|
||||
fi
|
||||
|
||||
|
|
34
LFS/lfs.xsl
34
LFS/lfs.xsl
|
@ -24,13 +24,13 @@
|
|||
<xsl:param name="vim-lang" select="1"/>
|
||||
|
||||
<!-- Time zone -->
|
||||
<xsl:param name="timezone" select="America/Toronto"/>
|
||||
<xsl:param name="timezone" select="GMT"/>
|
||||
|
||||
<!-- Page size -->
|
||||
<xsl:param name="page" select="letter"/>
|
||||
|
||||
<!-- Locale settings -->
|
||||
<xsl:param name="lang" select="en_CA"/>
|
||||
<xsl:param name="lang" select="C"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="//sect1"/>
|
||||
|
@ -112,7 +112,7 @@
|
|||
<xsl:value-of select="substring-before(string(),'make')"/>
|
||||
<xsl:text>make -k</xsl:text>
|
||||
<xsl:value-of select="substring-after(string(),'make')"/>
|
||||
<xsl:text> || true
</xsl:text>
|
||||
<xsl:text> >> $TEST_LOG 2>&1 || true
</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
|
@ -147,11 +147,21 @@
|
|||
<xsl:text>cp -v ../kernel-config .config
</xsl:text>
|
||||
</xsl:when>
|
||||
<!-- The Coreutils and Module-Init-Tools test suites are optional -->
|
||||
<xsl:when test="($testsuite = '0' or $testsuite = '1') and
|
||||
(ancestor::sect1[@id='ch-system-coreutils'] or
|
||||
<xsl:when test="(ancestor::sect1[@id='ch-system-coreutils'] or
|
||||
ancestor::sect1[@id='ch-system-module-init-tools']) and
|
||||
(contains(string(),'check') or
|
||||
contains(string(),'dummy'))"/>
|
||||
contains(string(),'dummy'))">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$testsuite = '0' or $testsuite = '1'"/>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates/>
|
||||
<xsl:if test="contains(string(),'check')">
|
||||
<xsl:text> >> $TEST_LOG 2>&1 || true</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>
</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<!-- Fixing toolchain test suites run -->
|
||||
<xsl:when test="string() = 'make check' or
|
||||
string() = 'make -k check'">
|
||||
|
@ -159,18 +169,15 @@
|
|||
<xsl:when test="(($testsuite = '1' or $testsuite = '2') and
|
||||
ancestor::chapter[@id='chapter-building-system']) or
|
||||
$testsuite = '3'">
|
||||
<xsl:text>make -k check || true</xsl:text>
|
||||
<xsl:text>
</xsl:text>
|
||||
<xsl:text>make -k check >> $TEST_LOG 2>&1 || true
</xsl:text>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="contains(string(),'glibc-check-log')">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$testsuite != '0'">
|
||||
<xsl:value-of select="substring-before(string(),'
')"/>
|
||||
<xsl:text> || true
</xsl:text>
|
||||
<xsl:value-of select="substring-after(string(),'
')"/>
|
||||
<xsl:text>
</xsl:text>
|
||||
<xsl:value-of select="substring-before(string(),'2>&1')"/>
|
||||
<xsl:text>>> $TEST_LOG 2>&1 || true
</xsl:text>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
|
@ -181,6 +188,9 @@
|
|||
ancestor::chapter[@id='chapter-building-system']) or
|
||||
$testsuite = '3'">
|
||||
<xsl:apply-templates/>
|
||||
<xsl:if test="contains(string(),'test_summary')">
|
||||
<xsl:text> >> $TEST_LOG</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>
</xsl:text>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
|
|
|
@ -112,6 +112,9 @@ chapter5_Makefiles() {
|
|||
|
||||
# Insert instructions for unpacking the package and to set the PKGDIR variable.
|
||||
wrt_unpack "$FILE"
|
||||
# If the testsuites must be run, initialize the log file
|
||||
[[ "$TEST" = "3" ]] && wrt_test_log "${this_script}"
|
||||
# If using optimizations, write the instructions
|
||||
[[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
|
||||
fi
|
||||
|
||||
|
@ -216,6 +219,16 @@ chapter6_Makefiles() {
|
|||
if [ "$vrs" != "" ] ; then
|
||||
FILE="$name-$vrs.tar.*"
|
||||
wrt_unpack2 "$FILE"
|
||||
# If the testsuites must be run, initialize the log file
|
||||
case $name in
|
||||
binutils | gcc | glibc )
|
||||
[[ "$TEST" != "0" ]] && wrt_test_log2 "${this_script}"
|
||||
;;
|
||||
* )
|
||||
[[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && wrt_test_log2 "${this_script}"
|
||||
;;
|
||||
esac
|
||||
# If using optimizations, write the instructions
|
||||
[[ "$OPTIMIZE" != "0" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
|
||||
fi
|
||||
|
||||
|
|
|
@ -276,7 +276,7 @@ wrt_unpack2() { #
|
|||
(
|
||||
cat << EOF
|
||||
@\$(call unpack2,$FILE)
|
||||
@ROOT=\`head -n1 \$(SRC)/\$(PKG_LST) | sed 's@^./@@;s@/.*@@'\` && \\
|
||||
@ROOT=\`head -n1 \$(MOUNT_PT)\$(SRC)/\$(PKG_LST) | sed 's@^./@@;s@/.*@@'\` && \\
|
||||
echo "export PKGDIR=\$(SRC)/\$\$ROOT" > envars
|
||||
EOF
|
||||
) >> $MKFILE.tmp
|
||||
|
@ -301,6 +301,30 @@ EOF
|
|||
) >> $MKFILE.tmp
|
||||
}
|
||||
|
||||
#----------------------------------#
|
||||
wrt_test_log() { # Initialize testsuite log file
|
||||
#----------------------------------#
|
||||
local TESTLOGFILE=$1
|
||||
(
|
||||
cat << EOF
|
||||
@echo "export TEST_LOG=$TESTLOGDIR/$TESTLOGFILE" >> envars && \\
|
||||
su - lfs -c "echo -e '\n\`date\`\n' >$TESTLOGDIR/$TESTLOGFILE"
|
||||
EOF
|
||||
) >> $MKFILE.tmp
|
||||
}
|
||||
|
||||
#----------------------------------#
|
||||
wrt_test_log2() { #
|
||||
#----------------------------------#
|
||||
local TESTLOGFILE=$1
|
||||
(
|
||||
cat << EOF
|
||||
@echo "export TEST_LOG=/$SCRIPT_ROOT/test-logs/$TESTLOGFILE" >> envars && \\
|
||||
echo -e "\n\`date\`\n" >test-logs/$TESTLOGFILE
|
||||
EOF
|
||||
) >> $MKFILE.tmp
|
||||
}
|
||||
|
||||
#----------------------------------#
|
||||
wrt_target_vars() { # Target vars for hlfs (cross-build method)
|
||||
#----------------------------------#
|
||||
|
|
|
@ -89,8 +89,9 @@ RUN_FARCE=0
|
|||
|
||||
#--- Working directories
|
||||
SCRIPT_ROOT=jhalfs
|
||||
JHALFSDIR=$BUILDDIR/$SCRIPT_ROOT
|
||||
LOGDIR=$JHALFSDIR/logs
|
||||
JHALFSDIR=$BUILDDIR/$SCRIPT_ROOT
|
||||
LOGDIR=$JHALFSDIR/logs
|
||||
TESTLOGDIR=$JHALFSDIR/test-logs
|
||||
|
||||
#--- File listing package contents (from where package sources dir is extracted)
|
||||
PKG_LST=unpacked
|
||||
|
|
|
@ -138,6 +138,7 @@ while test $# -gt 0 ; do
|
|||
BUILDDIR=$1
|
||||
JHALFSDIR=$BUILDDIR/${SCRIPT_ROOT}
|
||||
LOGDIR=$JHALFSDIR/logs
|
||||
TESTLOGDIR=$JHALFSDIR/test-logs
|
||||
MKFILE=$JHALFSDIR/Makefile
|
||||
;;
|
||||
esac
|
||||
|
@ -415,8 +416,8 @@ echo
|
|||
check_version "2.6.2" "`uname -r`" "KERNEL"
|
||||
check_version "3.0" "$BASH_VERSION" "BASH"
|
||||
check_version "3.0" "`gcc -dumpversion`" "GCC"
|
||||
tarVer=`tar --version`
|
||||
check_version "1.15.0" "${tarVer##* }" "TAR"
|
||||
tarVer=`tar --version | head -n1 | cut -d " " -f4`
|
||||
check_version "1.15.0" "${tarVer}" "TAR"
|
||||
echo "${SD_BORDER}${nl_}"
|
||||
|
||||
validate_config
|
||||
|
@ -479,10 +480,13 @@ if [[ ! -d $LOGDIR ]]; then
|
|||
fi
|
||||
>$LOGDIR/$LOG
|
||||
#
|
||||
[[ "$TEST" != "0" ]] && [[ ! -d $TESTLOGDIR ]] && install -d -m 1777 $TESTLOGDIR
|
||||
#
|
||||
if [[ "$PWD" != "$JHALFSDIR" ]]; then
|
||||
cp $COMMON_DIR/{makefile-functions,progress_bar.sh} $JHALFSDIR/
|
||||
#
|
||||
[[ "$OPTIMIZE" != "0" ]] && cp optimize/opt_override $JHALFSDIR/
|
||||
#
|
||||
if [[ "$COMPARE" != "0" ]] ; then
|
||||
mkdir -p $JHALFSDIR/extras
|
||||
cp extras/* $JHALFSDIR/extras
|
||||
|
|
Reference in a new issue