Changeset 45f82718 for LFS


Ignore:
Timestamp:
04/29/2006 02:44:29 PM (18 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
1.0, 2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
Children:
0ad851d
Parents:
c7c5a53
Message:

Merged ICA/farce support from experimental branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LFS/master.sh

    rc7c5a53 r45f82718  
    145145chapter6_Makefiles() {
    146146#----------------------------#
    147   echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter6${R_arrow}"
    148 
    149   for file in chapter06/* ; do
     147  # Set envars and scripts for iteration targets
     148  LOGS="" # Start with an empty global LOGS envar
     149  if [[ -z "$1" ]] ; then
     150    local N=""
     151  else
     152    local N=-build_$1
     153    local chapter6=""
     154    mkdir chapter06$N
     155    cp chapter06/* chapter06$N
     156    for script in chapter06$N/* ; do
     157      # Overwrite existing symlinks, files, and dirs
     158      sed -e 's/ln -sv/&f/g' \
     159          -e 's/mv -v/&f/g' \
     160          -e 's/mkdir -v/&p/g' -i ${script}
     161    done
     162    # Remove Bzip2 binaries before make install
     163    sed -e 's@make install@rm -vf /usr/bin/bz*\n&@' -i chapter06$N/*-bzip2
     164    # Fix how Module-Init-Tools do the install target
     165    sed -e 's@make install@make INSTALL=install install@' -i chapter06$N/*-module-init-tools
     166    # Delete *old Readline libraries just after make install
     167    sed -e 's@make install@&\nrm -v /lib/lib{history,readline}*old@' -i chapter06$N/*-readline
     168    # Let some Udev pre-installation commands to fail
     169    sed -e 's@/lib/udev/devices/fd@& || true@' \
     170        -e 's/mknod -m.*/& || true/' -i chapter06$N/*-udev
     171  fi
     172
     173  echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter6$N${R_arrow}"
     174
     175  for file in chapter06$N/* ; do
    150176    # Keep the script file name
    151177    this_script=`basename $file`
     
    158184    esac
    159185
    160     # First append each name of the script files to a list (this will become
    161     # the names of the targets in the Makefile
    162     chapter6="$chapter6 ${this_script}"
    163 
    164186    # Grab the name of the target
    165187    name=`echo ${this_script} | sed -e 's@[0-9]\{3\}-@@'`
    166188
     189    # Find the version of the command files, if it corresponds with the building of
     190    # a specific package. We need this here to can skip scripts not needed for
     191    # iterations rebuilds
     192    vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
     193
     194    if [[ "$vrs" = "" ]] && [[ -n "$N" ]] ; then
     195      case "${this_script}" in
     196        *stripping*) ;;
     197        *)  continue ;;
     198      esac
     199    fi
     200
     201    # Append each name of the script files to a list (this will become
     202    # the names of the targets in the Makefile)
     203    chapter6="$chapter6 ${this_script}${N}"
     204
     205    # Append each name of the script files to a list (this will become
     206    # the names of the logs to be moved for each iteration)
     207    LOGS="$LOGS ${this_script}"
     208
    167209    #--------------------------------------------------------------------#
    168210    #         >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<<          #
     
    171213    # Drop in the name of the target on a new line, and the previous target
    172214    # as a dependency. Also call the echo_message function.
    173     wrt_target "${this_script}" "$PREV"
    174 
    175     # Find the version of the command files, if it corresponds with the building of
    176     # a specific package
    177     vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
     215    wrt_target "${this_script}${N}" "$PREV"
    178216
    179217    # If $vrs isn't empty, we've got a package...
     
    205243
    206244    # Keep the script file name for Makefile dependencies.
    207     PREV=${this_script}
     245    PREV=${this_script}${N}
     246    # Set system_build envar for iteration targets
     247    system_build=$chapter6
    208248  done # end for file in chapter06/*
    209249}
     
    305345  chapter5_Makefiles
    306346  chapter6_Makefiles
     347  # Add the iterations targets, if needed
     348  [[ "$COMPARE" != "0" ]] && wrt_compare_targets
    307349  chapter789_Makefiles
    308350
Note: See TracChangeset for help on using the changeset viewer.