# $Id$
#----------------------------------#
wrt_ica_targets() { #
local system_rebuild=$1
wrt_system_rebuild "$system_rebuild"
wrt_iterations "$system_rebuild"
}
wrt_system_rebuild() { #
(
cat << EOF
system_rebuild: $system_rebuild
EOF
) >> $MKFILE
wrt_iterations() { #
for ((N=1; N <= ITERATIONS ; N++)) ; do # Double parentheses,
# and "ITERATIONS" with no "$".
ITERATION=iteration-$N
if [ "$N" = "1" ] ; then
$ITERATION: chapter06
@do_ica_prep
@pushd logs && \\
mkdir $ITERATION && \\
mv $system_rebuild $ITERATION && \\
popd
@rm -f $system_rebuild
@touch \$@
PREV=$ITERATION
elif [ "$N" = "$ITERATIONS" ] ; then
iteration-last: $PREV ICA_rebuild
mkdir iteration-last && \\
cp $system_rebuild iteration-last && \\
@do_ica_work
else
$ITERATION: $PREV ICA_rebuild
fi
done