Started new method to create iteration Makefile targets.

This commit is contained in:
Manuel Canales Esparcia 2006-04-11 20:03:19 +00:00
parent a212c80673
commit eb024db85b
2 changed files with 22 additions and 42 deletions

View file

@ -155,10 +155,7 @@ chapter6_Makefiles() {
# dependencies and target creation.
case "${this_script}" in
*chroot) continue ;;
*stripping*) [[ "${STRIP}" = "0" ]] && continue
[[ "${STRIP}" != "0" ]] && [[ "$COMPARE" != "0" ]] && \
system_rebuild="$system_rebuild ${this_script}"
;;
*stripping*) [[ "${STRIP}" = "0" ]] && continue ;;
esac
# First append each name of the script files to a list (this will become
@ -185,8 +182,6 @@ chapter6_Makefiles() {
if [ "$vrs" != "" ] ; then
FILE="$name-$vrs.tar.*"
wrt_unpack2 "$FILE"
# Add it to the system_rebuild target
[[ "$COMPARE" != "0" ]] && system_rebuild="$system_rebuild ${this_script}"
fi
# In the mount of kernel filesystems we need to set LFS
@ -310,6 +305,8 @@ build_Makefile() {
chapter4_Makefiles
chapter5_Makefiles
chapter6_Makefiles
# Add the ICA/farce targets, if needed
[[ "$COMPARE" != "0" ]] && wrt_ica_targets
chapter789_Makefiles
@ -401,9 +398,6 @@ restore-lfs-env:
EOF
) >> $MKFILE
# Add the ICA/farce targets
[[ "$COMPARE" != "0" ]] && wrt_ica_targets "$system_rebuild"
# Bring over the items from the Makefile.tmp
cat $MKFILE.tmp >> $MKFILE
rm $MKFILE.tmp

View file

@ -3,27 +3,6 @@
#----------------------------------#
wrt_ica_targets() { #
#----------------------------------#
local system_rebuild=$1
wrt_system_rebuild "$system_rebuild"
wrt_iterations "$system_rebuild"
}
#----------------------------------#
wrt_system_rebuild() { #
#----------------------------------#
local system_rebuild=$1
(
cat << EOF
system_rebuild: $system_rebuild
EOF
) >> $MKFILE
}
#----------------------------------#
wrt_iterations() { #
#----------------------------------#
local system_rebuild=$1
for ((N=1; N <= ITERATIONS ; N++)) ; do # Double parentheses,
# and "ITERATIONS" with no "$".
@ -31,26 +10,33 @@ wrt_iterations() { #
if [ "$N" = "1" ] ; then
echo "$ITERATION: chapter6" >> $MKFILE
echo -e "\t@\$(call echo_message, Building)" >> $MKFILE
wrt_prepare "$ITERATION"
wrt_ica_work "$ITERATION"
wrt_logs_and_clean "$ITERATION"
PREV=$ITERATION
elif [ "$N" = "$ITERATIONS" ] ; then
echo "iteration-last: $PREV system_rebuild" >> $MKFILE
echo -e "\t@\$(call echo_message, Building)" >> $MKFILE
wrt_prepare "$ITERATION" "$PREV"
wrt_logs "$ITERATION"
else
echo "$ITERATION: $PREV system_rebuild" >> $MKFILE
wrt_system_build $N
echo "iteration-last: $PREV system_build_$N" >> $MKFILE
echo -e "\t@\$(call echo_message, Building)" >> $MKFILE
wrt_prepare "$ITERATION" "$PREV"
wrt_logs_and_clean "$ITERATION"
PREV=$ITERATION
wrt_ica_work "$ITERATION" "$PREV"
if [ "$N" = "$ITERATIONS" ] ; then
wrt_logs "$ITERATION"
else
wrt_logs_and_clean "$ITERATION"
fi
fi
PREV=$ITERATION
done
}
#----------------------------------#
wrt_prepare() { #
wrt_system_build() { #
#----------------------------------#
local RUN=$1
# Placeholder for now
}
#----------------------------------#
wrt_ica_work() { #
#----------------------------------#
local ITERATION=$1
local PREV=$2