r2535 - in jhalfs/branches/experimental: LFS common

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Wed Apr 12 12:38:43 PDT 2006


Author: manuel
Date: 2006-04-12 13:38:42 -0600 (Wed, 12 Apr 2006)
New Revision: 2535

Modified:
   jhalfs/branches/experimental/LFS/master.sh
   jhalfs/branches/experimental/common/func_compare.sh
Log:
Generating truly separate sets of final system packages targets.

Modified: jhalfs/branches/experimental/LFS/master.sh
===================================================================
--- jhalfs/branches/experimental/LFS/master.sh	2006-04-12 17:12:35 UTC (rev 2534)
+++ jhalfs/branches/experimental/LFS/master.sh	2006-04-12 19:38:42 UTC (rev 2535)
@@ -145,8 +145,16 @@
 #----------------------------#
 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
     this_script=`basename $file`
@@ -160,7 +168,7 @@
 
     # 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 @@
     #
     # 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 @@
     #--------------------------------------------------------------------#
 
     # 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/*
 }
 

Modified: jhalfs/branches/experimental/common/func_compare.sh
===================================================================
--- jhalfs/branches/experimental/common/func_compare.sh	2006-04-12 17:12:35 UTC (rev 2534)
+++ jhalfs/branches/experimental/common/func_compare.sh	2006-04-12 19:38:42 UTC (rev 2535)
@@ -8,7 +8,7 @@
                                           # 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,10 +21,9 @@
 #----------------------------------#
 wrt_system_build() {               #
 #----------------------------------#
-  local RUN=$1
+  local     RUN=$1
+  local PREV_IT=$2
 
-  echo "system_build_$N: $PREV $chapter6" >> $MKFILE.tmp
-
   if [[ "$PROGNAME" = "clfs" ]] && [[ "$METHOD" = "chroot" ]] ; then
     final_system_Makefiles $RUN
   elif [[ "$PROGNAME" = "clfs" ]] && [[ "$METHOD" = "boot" ]] ; then
@@ -33,6 +32,9 @@
     chapter6_Makefiles $RUN
   fi
 
+  echo -e "\nsystem_build_$RUN: $PREV_IT $system_build" >> $MKFILE.tmp
+  PREV=system_build_$RUN
+
 }
 
 #----------------------------------#
@@ -106,10 +108,9 @@
     cat << EOF
 	@pushd logs && \\
 	mkdir $ITERATION && \\
-	cp ${chapter6}-$N $ITERATION && \\
+	cp ${system_build} $ITERATION && \\
 	popd
 	@touch \$@
-
 EOF
 ) >> $MKFILE.tmp
 }




More information about the alfs-log mailing list