diff --git a/LFS/lfs.xsl b/LFS/lfs.xsl index c393410..00b4891 100644 --- a/LFS/lfs.xsl +++ b/LFS/lfs.xsl @@ -47,6 +47,7 @@ + @@ -144,7 +145,8 @@ make install + to be run after the system has been built + (to be moved to a separate file) --> custom-tools/20_ @@ -245,15 +247,11 @@ make install - - - cd $SRCDIR - - - cd /sources - - - + cd + + $LFS + + /sources PKGDIR=`tar -tf $TARBALL | head -n1 | sed -e 's@^./@@;s@/.*@@'` if [ -d $PKGDIR ]; then rm -rf $PKGDIR @@ -291,15 +289,11 @@ SECONDS=0 - - - cd $SRCDIR - - - cd /sources - - - + cd + + $LFS + + /sources SECS=$SECONDS rm -rf $PKGDIR rm -rf ${PKGDIR%-*}-build @@ -367,7 +361,30 @@ exit - + + + + + + + 0 + + 0 + + 0 + 1 + + + 0 + + + + + blfs-tool-deps/30_ @@ -475,6 +492,10 @@ make install + + + + @@ -486,6 +507,8 @@ make install + + @@ -493,7 +516,9 @@ make install - + + + @@ -513,6 +538,9 @@ make install + + + PKG_PHASE= @@ -523,6 +551,15 @@ make install + + TEST_LOG= + + $LFS + + /jhalfs/test-logs/ + + echo -e "\n`date`\n" > $TEST_LOG + @@ -567,15 +604,27 @@ make install + - + + + + + + + + + + + + @@ -594,12 +643,6 @@ make install - - - - - - @@ -669,73 +712,61 @@ make install - - - - - - - - - - - - - - >> $TEST_LOG 2>&1 || true - - - - - - -k - - check >> $TEST_LOG 2>&1 - - || true - - - - - - - >> $TEST_LOG 2>&1 || true - - - - - >> $TEST_LOG - - - - - - - - - - - - make -k - - >> $TEST_LOG 2>&1 || true - - - - - >> $TEST_LOG 2>&1 - - - - - - + + + + + + + >> $TEST_LOG 2>&1 || true + + + + + + -k + + check >> $TEST_LOG 2>&1 + + || true + + + + + + + >> $TEST_LOG 2>&1 || true + + + + + >> $TEST_LOG + + + + + + + + + + + + make -k + + >> $TEST_LOG 2>&1 || true + + + + + >> $TEST_LOG 2>&1 + + + + + diff --git a/LFS/master.sh b/LFS/master.sh index de3d3e5..796614c 100644 --- a/LFS/master.sh +++ b/LFS/master.sh @@ -51,14 +51,11 @@ chapter4_Makefiles() { # @echo "set +h" > \$(LUSER_HOME)/.bashrc && \\ echo "umask 022" >> \$(LUSER_HOME)/.bashrc && \\ echo "LFS=\$(MOUNT_PT)" >> \$(LUSER_HOME)/.bashrc && \\ - echo "SRCDIR=\$(MOUNT_PT)/sources" >> \$(LUSER_HOME)/.bashrc && \\ echo "LC_ALL=POSIX" >> \$(LUSER_HOME)/.bashrc && \\ echo "PATH=/tools/bin:/bin:/usr/bin" >> \$(LUSER_HOME)/.bashrc && \\ echo "export LFS LC_ALL PATH" >> \$(LUSER_HOME)/.bashrc && \\ echo "source $JHALFSDIR/envars" >> \$(LUSER_HOME)/.bashrc && \\ - chown \$(LUSER):\$(LGROUP) \$(LUSER_HOME)/.bashrc && \\ - touch envars && \\ - chown \$(LUSER) envars + chown \$(LUSER):\$(LGROUP) \$(LUSER_HOME)/.bashrc @\$(call housekeeping) EOF ) > $MKFILE.tmp @@ -95,9 +92,6 @@ chapter5_Makefiles() { *) chapter5="$chapter5 ${this_script}" ;; esac - # Grab the package name, if the script is building a package - name=`grep "^PACKAGE=" ${file} | sed -e 's@PACKAGE=@@'` - # Set the dependency for the first target. if [ -z $PREV ] ; then PREV=04_04-settingenvironment ; fi @@ -109,14 +103,6 @@ chapter5_Makefiles() { # as a dependency. Also call the echo_message function. LUSER_wrt_target "${this_script}" "$PREV" - # If $name isn't empty, we've got a package... - if [ "$name" != "" ] ; then - # If the testsuites must be run, initialize the log file - [[ "$TEST" = "3" ]] && LUSER_wrt_test_log "${this_script}" - # If using optimizations, write the instructions - [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" - fi - # Run the script. # The changingowner script must be run as root. case "${this_script}" in @@ -175,7 +161,7 @@ chapter6_Makefiles() { *linux-headers*) [[ -n "$N" ]] && continue ;; esac - # Grab the name of the target. + # Grab the name of the package, if any. name=`grep "^PACKAGE=" ${file} | sed -e 's@PACKAGE=@@'` # Skip scripts not needed for iterations rebuilds @@ -207,24 +193,10 @@ chapter6_Makefiles() { *) CHROOT_wrt_target "${this_script}" "$PREV" ;; esac - # If $name isn't empty, we've got a package... - if [ "$name" != "" ] ; then - # Touch timestamp file if installed files logs will be created. - # But only for the firt build when running iterative builds. - if [ "${INSTALL_LOG}" = "y" ] && [ "x${N}" = "x" ] ; then - CHROOT_wrt_TouchTimestamp - fi - # If the testsuites must be run, initialize the log file - case $name in - binutils | gcc | glibc ) - [[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}" - ;; - * ) - [[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && CHROOT_wrt_test_log "${this_script}" - ;; - esac - # If using optimizations, write the instructions - [[ "$OPTIMIZE" != "0" ]] && wrt_optimize "$name" && wrt_makeflags "$name" + # Touch timestamp file if installed files logs will be created. + # But only for the firt build when running iterative builds. + if [ "$name" != "" ] && [ "${INSTALL_LOG}" = "y" ] && [ "x${N}" = "x" ] ; then + CHROOT_wrt_TouchTimestamp fi # In the mount of kernel filesystems we need to set LFS @@ -362,6 +334,7 @@ build_Makefile() { # chroot=`cat $file | tr -d '\n' | \ sed -e "s@chroot@$CHROOT_LOC@" \ -e 's@ \\\@ @g' \ + -e 's/ */ /g' \ -e 's|\\$|&&|g' \ -e 's|"$$LFS"|$(MOUNT_PT)|' \ -e 's|$| -c|'` diff --git a/common/libs/func_wrt_Makefile b/common/libs/func_wrt_Makefile index cd5f31f..598b5ca 100644 --- a/common/libs/func_wrt_Makefile +++ b/common/libs/func_wrt_Makefile @@ -58,7 +58,7 @@ EOF #==== TARGET HEADER ==== #----------------------------------# -LUSER_wrt_target() { # Create target and initialize envars file +LUSER_wrt_target() { # Create target #----------------------------------# local i=$1 local PREV=$2 @@ -68,7 +68,6 @@ cat << EOF $i: $PREV @\$(call echo_message, Building) @export BASHBIN=\$(SHELL) && \$(SHELL) progress_bar.sh \$@ \$\$PPID & - @rm -f envars && touch envars EOF ) >> $MKFILE.tmp } @@ -84,36 +83,6 @@ cat << EOF $i: $PREV @\$(call echo_message, Building) @export BASHBIN=\$(SHELL) && \$(SHELL) progress_bar.sh \$@ \$\$PPID & - @rm -f envars && touch envars -EOF -) >> $MKFILE.tmp -} - -#======================= - - -#===== TESTS LOGS ====== - -#----------------------------------# -LUSER_wrt_test_log() { # Initialize testsuite log file -#----------------------------------# - local TESTLOGFILE=$1 -( -cat << EOF - @echo "export TEST_LOG=\$(TESTLOGDIR)/$TESTLOGFILE" >> envars && \\ - echo "\$(nl_)\`date\`\$(nl_)" > \$(TESTLOGDIR)/\$@ -EOF -) >> $MKFILE.tmp -} - -#----------------------------------# -CHROOT_wrt_test_log() { # -#----------------------------------# - local TESTLOGFILE=$1 -( -cat << EOF - @echo "export TEST_LOG=\$(crTESTLOGDIR)/$TESTLOGFILE" >> envars && \\ - echo "\$(nl_)\`date\`\$(nl_)" > test-logs/\$@ EOF ) >> $MKFILE.tmp } @@ -152,7 +121,7 @@ LUSER_wrt_RunAsUser() { # ( cat << EOF - @source ~/.bashrc && \$(CMDSDIR)/`dirname $file`/\$@ > logs/\$@ 2>&1 + @\$(CMDSDIR)/`dirname $file`/\$@ > logs/\$@ 2>&1 EOF ) >> $MKFILE.tmp } @@ -163,7 +132,7 @@ CHROOT_wrt_RunAsRoot() { # local file=$1 ( cat << EOF - @source envars && \$(crCMDSDIR)/`dirname $file`/\$@ > logs/\$@ 2>&1 + @\$(crCMDSDIR)/`dirname $file`/\$@ > logs/\$@ 2>&1 EOF ) >> $MKFILE.tmp