Generating truly separate sets of final system packages targets.

This commit is contained in:
Manuel Canales Esparcia 2006-04-12 19:38:42 +00:00
parent d80021c356
commit aa08925b73
2 changed files with 21 additions and 10 deletions

View file

@ -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/*
}

View file

@ -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"
@ -22,8 +22,7 @@ wrt_compare_targets() { #
wrt_system_build() { #
#----------------------------------#
local RUN=$1
echo "system_build_$N: $PREV $chapter6" >> $MKFILE.tmp
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
}