Changeset 45f82718 for CLFS/master.sh


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
  • CLFS/master.sh

    rc7c5a53 r45f82718  
    462462final_system_Makefiles() {    #
    463463#-----------------------------#
    464   echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) final system${R_arrow}"
    465 
    466   for file in final-system/* ; do
     464  # Set envars and scripts for iteration targets
     465  LOGS="" # Start with an empty global LOGS envar
     466  if [[ -z "$1" ]] ; then
     467    local N=""
     468  else
     469    local N=-build_$1
     470    local basicsystem=""
     471    mkdir final-system$N
     472    cp final-system/* final-system$N
     473    for script in final-system$N/* ; do
     474      # Overwrite existing symlinks, files, and dirs
     475      sed -e 's/ln -sv/&f/g' \
     476          -e 's/mv -v/&f/g' \
     477          -e 's/mkdir -v/&p/g' -i ${script}
     478    done
     479    # Remove Bzip2 binaries before make install
     480    sed -e 's@make install@rm -vf /usr/bin/bz*\n&@' -i final-system$N/*-bzip2
     481    # Fix how Module-Init-Tools do the install target
     482    sed -e 's@make install@make INSTALL=install install@' -i final-system$N/*-module-init-tools
     483    # Delete *old Readline libraries just after make install
     484    sed -e 's@make install@&\nrm -v /lib/lib{history,readline}*old@' -i final-system$N/*-readline
     485  fi
     486
     487  echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) final system$N${R_arrow}"
     488
     489  for file in final-system$N/* ; do
    467490    # Keep the script file name
    468491    this_script=`basename $file`
    469492
    470     # Test if the stripping phase must be skipped
    471     case $this_script in
    472       *stripping*) [[ "$STRIP" = "0" ]] && continue
    473        ;;
    474     esac
    475 
    476     # First append each name of the script files to a list (this will become
    477     # the names of the targets in the Makefile
    478     basicsystem="$basicsystem $this_script"
     493    # Test if the stripping phase must be skipped.
     494    # Skip alsp temp-perl for iterative runs
     495    case $this_script in
     496      *stripping*) [[ "$STRIP" = "0" ]] && continue ;;
     497      *temp-perl*) [[ -n "$N" ]] && continue ;;
     498    esac
    479499
    480500    # Grab the name of the target, strip id number, XXX-script
     
    486506                                  -e 's@n32@@'`
    487507
     508    # Find the version of the command files, if it corresponds with the building of
     509    # a specific package. We need this here to can skip scripts not needed for
     510    # iterations rebuilds
    488511    vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
     512
     513    if [[ "$vrs" = "" ]] && [[ -n "$N" ]] ; then
     514      case "${this_script}" in
     515        *stripping*) ;;
     516        *)  continue ;;
     517      esac
     518    fi
     519
     520    # Append each name of the script files to a list (this will become
     521    # the names of the targets in the Makefile
     522    basicsystem="$basicsystem ${this_script}${N}"
     523
     524    # Append each name of the script files to a list (this will become
     525    # the names of the logs to be moved for each iteration)
     526    LOGS="$LOGS ${this_script}"
    489527
    490528    #--------------------------------------------------------------------#
     
    494532    # Drop in the name of the target on a new line, and the previous target
    495533    # as a dependency. Also call the echo_message function.
    496     wrt_target "${this_script}" "$PREV"
     534    wrt_target "${this_script}${N}" "$PREV"
    497535
    498536    # If $vrs isn't empty, we've got a package...
    499537    if [ "$vrs" != "" ] ; then
    500       case $name in
    501         temp-perl) wrt_unpack2 "perl-$vrs.tar.*"    ;;
    502         *)         wrt_unpack2 "$name-$vrs.tar.*"   ;;
    503       esac
     538      FILE="$name-$vrs.tar.*"
     539      wrt_unpack2 "$FILE"
    504540    fi
    505541    #
     
    516552    #
    517553    # Keep the script file name for Makefile dependencies.
    518     PREV=$this_script
    519 
     554    PREV=${this_script}${N}
     555    # Set system_build envar for iteration targets
     556    system_build=$basicsystem
    520557  done  # for file in final-system/* ...
    521558}
     
    525562bm_final_system_Makefiles() { #
    526563#-----------------------------#
    527   echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) final system${R_arrow}"
    528 
    529   # The makesys phase was initiated in bm_testsuite_tools_makefile
    530   [[ "$TEST" = 0 ]] && PREV=""
    531 
    532   for file in final-system/* ; do
     564  # Set envars and scripts for iteration targets
     565  LOGS="" # Start with an empty global LOGS envar
     566  if [[ -z "$1" ]] ; then
     567    local N=""
     568    # The makesys phase was initiated in bm_testsuite_tools_makefile
     569    [[ "$TEST" = 0 ]] && PREV=""
     570  else
     571    local N=-build_$1
     572    local basicsystem=""
     573    mkdir final-system$N
     574    cp final-system/* final-system$N
     575    for script in final-system$N/* ; do
     576      # Overwrite existing symlinks, files, and dirs
     577      sed -e 's/ln -sv/&f/g' \
     578          -e 's/mv -v/&f/g' \
     579          -e 's/mkdir -v/&p/g' -i ${script}
     580    done
     581    # Remove Bzip2 binaries before make install
     582    sed -e 's@make install@rm -vf /usr/bin/bz*\n&@' -i final-system$N/*-bzip2
     583    # Fix how Module-Init-Tools do the install target
     584    sed -e 's@make install@make INSTALL=install install@' -i final-system$N/*-module-init-tools
     585    # Delete *old Readline libraries just after make install
     586    sed -e 's@make install@&\nrm -v /lib/lib{history,readline}*old@' -i final-system$N/*-readline
     587  fi
     588
     589  echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) final system$N${R_arrow}"
     590
     591  for file in final-system$N/* ; do
    533592    # Keep the script file name
    534593    this_script=`basename $file`
    535594
    536595    # Test if the stripping phase must be skipped
    537     case $this_script in
    538       *stripping*) [[ "$STRIP" = "0" ]] && continue
    539        ;;
    540     esac
    541 
    542     # First append each name of the script files to a list (this will become
    543     # the names of the targets in the Makefile
    544     basicsystem="$basicsystem $this_script"
     596    # Skip alsp temp-perl for iterative runs
     597    case $this_script in
     598      *stripping*) [[ "$STRIP" = "0" ]] && continue ;;
     599      *temp-perl*) [[ -n "$N" ]] && continue ;;
     600    esac
    545601
    546602    # Grab the name of the target, strip id number, XXX-script
     
    552608                                  -e 's@n32@@'`
    553609
     610    # Find the version of the command files, if it corresponds with the building of
     611    # a specific package. We need this here to can skip scripts not needed for
     612    # iterations rebuilds
    554613    vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
     614
     615    if [[ "$vrs" = "" ]] && [[ -n "$N" ]] ; then
     616      case "${this_script}" in
     617        *stripping*) ;;
     618        *)  continue ;;
     619      esac
     620    fi
     621
     622    # Append each name of the script files to a list (this will become
     623    # the names of the targets in the Makefile
     624    basicsystem="$basicsystem ${this_script}${N}"
     625
     626    # Append each name of the script files to a list (this will become
     627    # the names of the logs to be moved for each iteration)
     628    LOGS="$LOGS ${this_script}"
    555629
    556630    #--------------------------------------------------------------------#
     
    560634    # Drop in the name of the target on a new line, and the previous target
    561635    # as a dependency. Also call the echo_message function.
    562     wrt_target "${this_script}" "$PREV"
     636    wrt_target "${this_script}${N}" "$PREV"
    563637
    564638    # If $vrs isn't empty, we've got a package...
    565639    if [ "$vrs" != "" ] ; then
    566       case $name in
    567         temp-perl) wrt_unpack3 "perl-$vrs.tar.*"    ;;
    568         *)         wrt_unpack3 "$name-$vrs.tar.*"   ;;
    569       esac
     640      FILE="$name-$vrs.tar.*"
     641      wrt_unpack3 "$FILE"
    570642    fi
    571643    #
     
    582654    #
    583655    # Keep the script file name for Makefile dependencies.
    584     PREV=$this_script
    585 
     656    PREV=${this_script}${N}
     657    # Set system_build envar for iteration targets
     658    system_build=$basicsystem
    586659  done  # for file in final-system/* ...
    587660}
     
    886959    fi
    887960    final_system_Makefiles         # $basicsystem
     961    # Add the iterations targets, if needed
     962    [[ "$COMPARE" != "0" ]] && wrt_compare_targets
    888963    bootscripts_Makefiles          # $bootscripttools
    889964    bootable_Makefiles             # $bootabletools
     
    894969    fi
    895970    bm_final_system_Makefiles      # $basicsystem
     971    # Add the iterations targets, if needed
     972    [[ "$COMPARE" != "0" ]] && wrt_compare_targets
    896973    bm_bootscripts_Makefiles       # $bootscipttools
    897974    bm_bootable_Makefiles          # $bootabletoosl
Note: See TracChangeset for help on using the changeset viewer.