From aa08925b732bf72fc21710e6fb16b4e5fa21376c Mon Sep 17 00:00:00 2001 From: Manuel Canales Esparcia Date: Wed, 12 Apr 2006 19:38:42 +0000 Subject: [PATCH] Generating truly separate sets of final system packages targets. --- LFS/master.sh | 18 ++++++++++++++---- common/func_compare.sh | 13 +++++++------ 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/LFS/master.sh b/LFS/master.sh index 1ee86c5..863e51f 100755 --- a/LFS/master.sh +++ b/LFS/master.sh @@ -145,7 +145,15 @@ chapter5_Makefiles() { #----------------------------# chapter6_Makefiles() { #----------------------------# - echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter6${R_arrow}" + # Set N and chapter6 for iteration targets + if [[ -z $1 ]] ; then + local N="" + else + local N=-build_$1 + local chapter6="" + fi + + echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter6$N${R_arrow}" for file in chapter06/* ; do # Keep the script file name @@ -160,7 +168,7 @@ chapter6_Makefiles() { # First append each name of the script files to a list (this will become # the names of the targets in the Makefile - chapter6="$chapter6 ${this_script}" + chapter6="$chapter6 ${this_script}${N}" # Grab the name of the target name=`echo ${this_script} | sed -e 's@[0-9]\{3\}-@@'` @@ -171,7 +179,7 @@ chapter6_Makefiles() { # # Drop in the name of the target on a new line, and the previous target # as a dependency. Also call the echo_message function. - wrt_target "${this_script}" "$PREV" + wrt_target "${this_script}${N}" "$PREV" # Find the version of the command files, if it corresponds with the building of # a specific package @@ -205,7 +213,9 @@ chapter6_Makefiles() { #--------------------------------------------------------------------# # Keep the script file name for Makefile dependencies. - PREV=${this_script} + PREV=${this_script}${N} + # Set system_build envar for iteration targets + system_build=$chapter6 done # end for file in chapter06/* } diff --git a/common/func_compare.sh b/common/func_compare.sh index 9fe36e9..16387bc 100644 --- a/common/func_compare.sh +++ b/common/func_compare.sh @@ -8,7 +8,7 @@ wrt_compare_targets() { # # and "ITERATIONS" with no "$". ITERATION=iteration-$N if [ "$N" != "1" ] ; then - wrt_system_build "$N" + wrt_system_build "$N" "$PREV_IT" fi wrt_target "$ITERATION" "$PREV" wrt_compare_work "$ITERATION" "$PREV_IT" @@ -21,9 +21,8 @@ wrt_compare_targets() { # #----------------------------------# wrt_system_build() { # #----------------------------------# - local RUN=$1 - - echo "system_build_$N: $PREV $chapter6" >> $MKFILE.tmp + local RUN=$1 + local PREV_IT=$2 if [[ "$PROGNAME" = "clfs" ]] && [[ "$METHOD" = "chroot" ]] ; then final_system_Makefiles $RUN @@ -33,6 +32,9 @@ wrt_system_build() { # chapter6_Makefiles $RUN fi + echo -e "\nsystem_build_$RUN: $PREV_IT $system_build" >> $MKFILE.tmp + PREV=system_build_$RUN + } #----------------------------------# @@ -106,10 +108,9 @@ wrt_logs() { # cat << EOF @pushd logs && \\ mkdir $ITERATION && \\ - cp ${chapter6}-$N $ITERATION && \\ + cp ${system_build} $ITERATION && \\ popd @touch \$@ - EOF ) >> $MKFILE.tmp }