Generating new iteration-N targets and dummy system_build_N targets.
This commit is contained in:
parent
eb024db85b
commit
d27c9ca2fd
2 changed files with 23 additions and 50 deletions
|
@ -214,9 +214,6 @@ chapter789_Makefiles() {
|
||||||
#----------------------------#
|
#----------------------------#
|
||||||
echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter7/8/9${R_arrow}"
|
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
|
for file in chapter0{7,8,9}/* ; do
|
||||||
# Keep the script file name
|
# Keep the script file name
|
||||||
this_script=`basename $file`
|
this_script=`basename $file`
|
||||||
|
@ -306,7 +303,7 @@ build_Makefile() {
|
||||||
chapter5_Makefiles
|
chapter5_Makefiles
|
||||||
chapter6_Makefiles
|
chapter6_Makefiles
|
||||||
# Add the ICA/farce targets, if needed
|
# Add the ICA/farce targets, if needed
|
||||||
[[ "$COMPARE" != "0" ]] && wrt_ica_targets
|
[[ "$COMPARE" != "0" ]] && wrt_compare_targets
|
||||||
chapter789_Makefiles
|
chapter789_Makefiles
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,28 +1,19 @@
|
||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
#----------------------------------#
|
#----------------------------------#
|
||||||
wrt_ica_targets() { #
|
wrt_compare_targets() { #
|
||||||
#----------------------------------#
|
#----------------------------------#
|
||||||
|
|
||||||
for ((N=1; N <= ITERATIONS ; N++)) ; do # Double parentheses,
|
for ((N=1; N <= ITERATIONS ; N++)) ; do # Double parentheses,
|
||||||
# and "ITERATIONS" with no "$".
|
# and "ITERATIONS" with no "$".
|
||||||
ITERATION=iteration-$N
|
ITERATION=iteration-$N
|
||||||
if [ "$N" = "1" ] ; then
|
if [ "$N" != "1" ] ; then
|
||||||
echo "$ITERATION: chapter6" >> $MKFILE
|
wrt_system_build "$N"
|
||||||
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
|
|
||||||
fi
|
fi
|
||||||
|
wrt_target "$ITERATION" "$PREV"
|
||||||
|
wrt_compare_work "$ITERATION" "$PREV_IT"
|
||||||
|
wrt_logs "$N"
|
||||||
|
PREV_IT=$ITERATION
|
||||||
PREV=$ITERATION
|
PREV=$ITERATION
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
@ -33,13 +24,16 @@ wrt_system_build() { #
|
||||||
local RUN=$1
|
local RUN=$1
|
||||||
|
|
||||||
# Placeholder for now
|
# Placeholder for now
|
||||||
|
|
||||||
|
echo "system_build_$N: $chapter6" >> $MKFILE.tmp
|
||||||
|
PREV=system_build_$N
|
||||||
}
|
}
|
||||||
|
|
||||||
#----------------------------------#
|
#----------------------------------#
|
||||||
wrt_ica_work() { #
|
wrt_compare_work() { #
|
||||||
#----------------------------------#
|
#----------------------------------#
|
||||||
local ITERATION=$1
|
local ITERATION=$1
|
||||||
local PREV=$2
|
local PREV_IT=$2
|
||||||
local PRUNEPATH="/dev /home /jhalfs /lost+found /media /mnt /opt /proc \
|
local PRUNEPATH="/dev /home /jhalfs /lost+found /media /mnt /opt /proc \
|
||||||
/sources /root /srv /sys /tmp /tools /usr/local /usr/src /var/log/paco"
|
/sources /root /srv /sys /tmp /tools /usr/local /usr/src /var/log/paco"
|
||||||
|
|
||||||
|
@ -60,9 +54,9 @@ wrt_ica_work() { #
|
||||||
@extras/do_copy_files "$PRUNEPATH" $ROOT_DIR $DEST_ICA/$ITERATION && \\
|
@extras/do_copy_files "$PRUNEPATH" $ROOT_DIR $DEST_ICA/$ITERATION && \\
|
||||||
extras/do_ica_prep $DEST_ICA/$ITERATION
|
extras/do_ica_prep $DEST_ICA/$ITERATION
|
||||||
EOF
|
EOF
|
||||||
) >> $MKFILE
|
) >> $MKFILE.tmp
|
||||||
if [[ "$ITERATION" != "iteration-1" ]] ; then
|
if [[ "$ITERATION" != "iteration-1" ]] ; then
|
||||||
wrt_do_ica_work "$PREV" "$ITERATION" "$DEST_ICA"
|
wrt_do_ica_work "$PREV_IT" "$ITERATION" "$DEST_ICA"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -73,9 +67,9 @@ EOF
|
||||||
@extras/do_copy_files "$PRUNEPATH" $ROOT_DIR $DEST_FARCE/$ITERATION && \\
|
@extras/do_copy_files "$PRUNEPATH" $ROOT_DIR $DEST_FARCE/$ITERATION && \\
|
||||||
extras/filelist $DEST_FARCE/$ITERATION $DEST_FARCE/$ITERATION.filelist
|
extras/filelist $DEST_FARCE/$ITERATION $DEST_FARCE/$ITERATION.filelist
|
||||||
EOF
|
EOF
|
||||||
) >> $MKFILE
|
) >> $MKFILE.tmp
|
||||||
if [[ "$ITERATION" != "iteration-1" ]] ; then
|
if [[ "$ITERATION" != "iteration-1" ]] ; then
|
||||||
wrt_do_farce_work "$PREV" "$ITERATION" "$DEST_FARCE"
|
wrt_do_farce_work "$PREV_IT" "$ITERATION" "$DEST_FARCE"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -83,51 +77,33 @@ EOF
|
||||||
#----------------------------------#
|
#----------------------------------#
|
||||||
wrt_do_ica_work() { #
|
wrt_do_ica_work() { #
|
||||||
#----------------------------------#
|
#----------------------------------#
|
||||||
echo -e "\t@extras/do_ica_work $1 $2 $ICALOGDIR $3" >> $MKFILE
|
echo -e "\t@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 OUTPUT=$FARCELOGDIR/${1}_V_${2}
|
||||||
local PREDIR=$3/$1
|
local PREDIR=$3/$1
|
||||||
local PREFILE=$3/$1.filelist
|
local PREFILE=$3/$1.filelist
|
||||||
local ITEDIR=$3/$2
|
local ITEDIR=$3/$2
|
||||||
local ITEFILE=$3/$2.filelist
|
local ITEFILE=$3/$2.filelist
|
||||||
echo -e "\t@extras/farce --directory $OUTPUT $PREDIR $PREFILE $ITEDIR $ITEFILE" >> $MKFILE
|
echo -e "\t@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() { #
|
wrt_logs() { #
|
||||||
#----------------------------------#
|
#----------------------------------#
|
||||||
local ITERATION=$1
|
local ITERATION=iteration$1
|
||||||
|
|
||||||
(
|
(
|
||||||
cat << EOF
|
cat << EOF
|
||||||
@pushd logs && \\
|
@pushd logs && \\
|
||||||
mkdir $ITERATION && \\
|
mkdir $ITERATION && \\
|
||||||
cp $system_rebuild $ITERATION && \\
|
cp ${chapter6}-$N $ITERATION && \\
|
||||||
popd
|
popd
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
) >> $MKFILE
|
) >> $MKFILE.tmp
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue