r2531 - in jhalfs/branches/experimental: LFS common

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Tue Apr 11 15:06:37 PDT 2006


Author: manuel
Date: 2006-04-11 16:06:37 -0600 (Tue, 11 Apr 2006)
New Revision: 2531

Modified:
   jhalfs/branches/experimental/LFS/master.sh
   jhalfs/branches/experimental/common/func_ICA.sh
Log:
Generating new iteration-N targets and dummy system_build_N targets.

Modified: jhalfs/branches/experimental/LFS/master.sh
===================================================================
--- jhalfs/branches/experimental/LFS/master.sh	2006-04-11 20:03:19 UTC (rev 2530)
+++ jhalfs/branches/experimental/LFS/master.sh	2006-04-11 22:06:37 UTC (rev 2531)
@@ -214,9 +214,6 @@
 #----------------------------#
   echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter7/8/9${R_arrow}"
 
-  # Reset $PREV for ICA/farce runs
-  [[ "$COMPARE" != "0" ]] && PREV=iteration-last
-
   for file in chapter0{7,8,9}/* ; do
     # Keep the script file name
     this_script=`basename $file`
@@ -306,7 +303,7 @@
   chapter5_Makefiles
   chapter6_Makefiles
   # Add the ICA/farce targets, if needed
-  [[ "$COMPARE" != "0" ]] && wrt_ica_targets
+  [[ "$COMPARE" != "0" ]] && wrt_compare_targets
   chapter789_Makefiles
 
 

Modified: jhalfs/branches/experimental/common/func_ICA.sh
===================================================================
--- jhalfs/branches/experimental/common/func_ICA.sh	2006-04-11 20:03:19 UTC (rev 2530)
+++ jhalfs/branches/experimental/common/func_ICA.sh	2006-04-11 22:06:37 UTC (rev 2531)
@@ -1,28 +1,19 @@
 # $Id$
 
 #----------------------------------#
-wrt_ica_targets() {                #
+wrt_compare_targets() {            #
 #----------------------------------#
 
   for ((N=1; N <= ITERATIONS ; N++)) ; do # Double parentheses,
                                           # and "ITERATIONS" with no "$".
     ITERATION=iteration-$N
-    if [ "$N" = "1" ] ; then
-      echo "$ITERATION:  chapter6" >> $MKFILE
-      echo -e "\t@\$(call echo_message, Building)" >> $MKFILE
-      wrt_ica_work       "$ITERATION"
-      wrt_logs_and_clean "$ITERATION"
-    else
-      wrt_system_build $N
-      echo "iteration-last:  $PREV  system_build_$N" >> $MKFILE
-      echo -e "\t@\$(call echo_message, Building)" >> $MKFILE
-      wrt_ica_work       "$ITERATION" "$PREV"
-      if [ "$N" = "$ITERATIONS" ] ; then
-        wrt_logs           "$ITERATION"
-      else
-        wrt_logs_and_clean "$ITERATION"
-      fi
+    if [ "$N" != "1" ] ; then
+      wrt_system_build "$N"
     fi
+    wrt_target "$ITERATION" "$PREV"
+    wrt_compare_work "$ITERATION" "$PREV_IT"
+    wrt_logs "$N"
+    PREV_IT=$ITERATION
     PREV=$ITERATION
   done
 }
@@ -33,13 +24,16 @@
   local RUN=$1
 
   # Placeholder for now
+
+  echo "system_build_$N: $chapter6" >> $MKFILE.tmp
+  PREV=system_build_$N
 }
 
 #----------------------------------#
-wrt_ica_work() {                   #
+wrt_compare_work() {               #
 #----------------------------------#
   local ITERATION=$1
-  local      PREV=$2
+  local   PREV_IT=$2
   local PRUNEPATH="/dev /home /jhalfs /lost+found /media /mnt /opt /proc \
 /sources /root /srv /sys /tmp /tools /usr/local /usr/src /var/log/paco"
 
@@ -60,9 +54,9 @@
 	@extras/do_copy_files "$PRUNEPATH" $ROOT_DIR $DEST_ICA/$ITERATION && \\
 	extras/do_ica_prep $DEST_ICA/$ITERATION
 EOF
-) >> $MKFILE
+) >> $MKFILE.tmp
     if [[ "$ITERATION" != "iteration-1" ]] ; then
-      wrt_do_ica_work "$PREV" "$ITERATION" "$DEST_ICA"
+      wrt_do_ica_work "$PREV_IT" "$ITERATION" "$DEST_ICA"
     fi
   fi
 
@@ -73,9 +67,9 @@
 	@extras/do_copy_files "$PRUNEPATH" $ROOT_DIR $DEST_FARCE/$ITERATION && \\
 	extras/filelist $DEST_FARCE/$ITERATION $DEST_FARCE/$ITERATION.filelist
 EOF
-) >> $MKFILE
+) >> $MKFILE.tmp
     if [[ "$ITERATION" != "iteration-1" ]] ; then
-      wrt_do_farce_work "$PREV" "$ITERATION" "$DEST_FARCE"
+      wrt_do_farce_work "$PREV_IT" "$ITERATION" "$DEST_FARCE"
     fi
   fi
 }
@@ -83,51 +77,33 @@
 #----------------------------------#
 wrt_do_ica_work() {                #
 #----------------------------------#
-  echo -e "\t at extras/do_ica_work $1 $2 $ICALOGDIR $3" >> $MKFILE
+  echo -e "\t at extras/do_ica_work $1 $2 $ICALOGDIR $3" >> $MKFILE.tmp
 }
 
 #----------------------------------#
-wrt_do_farce_work() {                    #
+wrt_do_farce_work() {              #
 #----------------------------------#
   local OUTPUT=$FARCELOGDIR/${1}_V_${2}
   local PREDIR=$3/$1
   local PREFILE=$3/$1.filelist
   local ITEDIR=$3/$2
   local ITEFILE=$3/$2.filelist
-  echo -e "\t at extras/farce --directory $OUTPUT $PREDIR $PREFILE $ITEDIR $ITEFILE" >> $MKFILE
+  echo -e "\t at extras/farce --directory $OUTPUT $PREDIR $PREFILE $ITEDIR $ITEFILE" >> $MKFILE.tmp
 }
 
 #----------------------------------#
-wrt_logs_and_clean() {             #
-#----------------------------------#
-  local ITERATION=$1
-
-(
-    cat << EOF
-	@pushd logs && \\
-	mkdir $ITERATION && \\
-	mv $system_rebuild $ITERATION && \\
-	popd
-	@rm -f $system_rebuild
-	@touch \$@
-
-EOF
-) >> $MKFILE
-}
-
-#----------------------------------#
 wrt_logs() {             #
 #----------------------------------#
-  local ITERATION=$1
+  local ITERATION=iteration$1
 
 (
     cat << EOF
 	@pushd logs && \\
 	mkdir $ITERATION && \\
-	cp $system_rebuild $ITERATION && \\
+	cp ${chapter6}-$N $ITERATION && \\
 	popd
 	@touch \$@
 
 EOF
-) >> $MKFILE
+) >> $MKFILE.tmp
 }




More information about the alfs-log mailing list