From b24213688069b1bb02a07994212da1d59a11f0d9 Mon Sep 17 00:00:00 2001 From: Manuel Canales Esparcia Date: Wed, 12 Apr 2006 20:23:12 +0000 Subject: [PATCH] Skip unwanted scripts for iteration builds. --- LFS/master.sh | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/LFS/master.sh b/LFS/master.sh index 863e51f..083d340 100755 --- a/LFS/master.sh +++ b/LFS/master.sh @@ -146,7 +146,7 @@ chapter5_Makefiles() { chapter6_Makefiles() { #----------------------------# # Set N and chapter6 for iteration targets - if [[ -z $1 ]] ; then + if [[ -z "$1" ]] ; then local N="" else local N=-build_$1 @@ -166,13 +166,25 @@ chapter6_Makefiles() { *stripping*) [[ "${STRIP}" = "0" ]] && continue ;; esac + # Grab the name of the target + name=`echo ${this_script} | sed -e 's@[0-9]\{3\}-@@'` + + # Find the version of the command files, if it corresponds with the building of + # a specific package. We need this here to can skip scripts not needed for + # iterations rebuilds + vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` + + if [[ "$vrs" = "" ]] && [[ -n "$N" ]] ; then + case "${this_script}" in + *stripping*) ;; + *) continue ;; + esac + fi + # 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}${N}" - # Grab the name of the target - name=`echo ${this_script} | sed -e 's@[0-9]\{3\}-@@'` - #--------------------------------------------------------------------# # >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< # #--------------------------------------------------------------------# @@ -181,10 +193,6 @@ chapter6_Makefiles() { # as a dependency. Also call the echo_message function. wrt_target "${this_script}${N}" "$PREV" - # Find the version of the command files, if it corresponds with the building of - # a specific package - vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` - # If $vrs isn't empty, we've got a package... # Insert instructions for unpacking the package and changing directories if [ "$vrs" != "" ] ; then