Changeset d310939


Ignore:
Timestamp:
10/02/2005 09:14:02 AM (19 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
0.2, 1.0, 2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
Children:
3cfe871
Parents:
71642ef
Message:

Making the packages dowload and testsuites run optional.
Added a switch to desactivate the automatic run of make.
Fixed some oustanding bugs and chapter05 issues.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • dump-commands.xsl

    r71642ef rd310939  
    6262          <xsl:apply-templates select="userinput" mode="screen"/>
    6363          <xsl:if test="position() != last() and
    64               not(contains(string(),'EOF'))">
     64              not(contains(string(),'EOF')) and
     65              not(contains(string(),'check')) and
     66              not(ancestor::sect1[@id='ch-tools-stripping'])">
    6567            <xsl:text> &amp;&amp;</xsl:text>
    6668          </xsl:if>
     
    7274
    7375  <xsl:template match="para/userinput">
    74     <xsl:if test="$testsuite = '0' and (contains(string(),'test') or
     76    <xsl:if test="$testsuite != '0' and (contains(string(),'test') or
    7577        contains(string(),'check'))">
    7678      <xsl:value-of select="substring-before(string(),'make')"/>
    7779      <xsl:text>make -k</xsl:text>
    7880      <xsl:value-of select="substring-after(string(),'make')"/>
    79       <xsl:text> &amp;&amp;&#xA;</xsl:text>
     81      <xsl:text> &#xA;</xsl:text>
    8082    </xsl:if>
    8183  </xsl:template>
  • jhalfs

    r71642ef rd310939  
    2323  -D, --download-client=CLIENT  use CLIENT as the program for retrieving
    2424                                packages
    25   -T, --no-testsuites           don't run the package's testsuites
    26   -P, --have-packages           don't download the packages
     25  -T, --testsuites              run the optional testsuites
     26  -P, --get-packages            download the packages
     27  -M, --run-make                run make on the generated Makefile
    2728"
    2829
     
    8081      ;;
    8182
    82     --no-testsuites | -T )
    83       shift
     83    --testsuites | -T )
    8484      TEST=1
    8585      shift
    8686      ;;
    8787
    88     --have-packages | -P )
    89       shift
     88    --get-packages | -P )
    9089      HPKG=1
     90      shift
     91      ;;
     92
     93    --run-make | -M )
     94      RUNMAKE=1
    9195      shift
    9296      ;;
     
    231235
    232236  # Test if the packages must be downloaded
    233   if [ -z $HPKG ] ; then
     237  if [ "$HPKG" = "1" ] ; then
    234238
    235239    # This variable is necessary to make sure the `cat $JHALFSDIR/packages`
     
    310314    fi
    311315
    312     # Dump the path to the Binutils and TCL sources
    313     if [ "$i" = "027-binutils-pass1" -o "$i" = "032-tcl" ] ; then
     316    # Dump the path to the Binutils or TCL sources directory.
     317    if [ "$i" = "027-binutils-pass1" -o "$i" = "032-tcl" -o "$i" = "036-binutils-pass2" ] ; then
    314318      echo -e "\techo \"\$(LFS)\$(SRC)/\$\$ROOT\" > sources-dir && \\" >> $MKFILE.tmp
    315319    fi
     
    320324    # For the Adjusting phase we must to cd to the binutils-build directory.
    321325    if [ "$i" = "031-adjusting" ] ; then
    322       echo -e "\techo \"PKGDIR=\`cat sources-dir\`\" > envars && \\" >> $MKFILE.tmp
     326      echo -e "\techo \"PKGDIR=\$(LFS)\$(SRC)/binutils-build\" > envars && \\" >> $MKFILE.tmp
    323327      echo -e "\techo \"export PKGDIR\" >> envars && \\" >> $MKFILE.tmp
    324328    fi
     
    341345
    342346    # Remove the build directory(ies) even if the package build fails, except for
    343     # Binutils pass1 and TCL. In that cases the sources directories are removed
     347    # Binutils and TCL. In that cases the sources directories are removed
    344348    # only if the build fails.
    345349    if [ "$vrs" != "" ] ; then
    346       if [ "$i" != "027-binutils-pass1" ] && [ "$i" != "032-tcl" ] ; then
     350      if [ "$i" != "027-binutils-pass1" ] && [ "$i" != "032-tcl" ] && [ "$i" != "036-binutils-pass2" ] ; then
    347351        echo -e "\tROOT=\`head -n1 /tmp/unpacked | sed 's@/.*@@'\` && \\" >> $MKFILE.tmp
    348352        echo -e "\trm -r \$(LFS)\$(SRC)/\$\$ROOT && \\" >> $MKFILE.tmp
    349         echo -e "\tif [ -e \$(LFS)\$(SRC)/*-build ]; then \\" >> $MKFILE.tmp
    350         echo -e "\t\trm -r \$(LFS)\$(SRC)/*-build; \\" >> $MKFILE.tmp
     353        echo -e "\tif [ -e \$(LFS)\$(SRC)/$name-build ]; then \\" >> $MKFILE.tmp
     354        echo -e "\t\trm -r \$(LFS)\$(SRC)/$name-build; \\" >> $MKFILE.tmp
    351355        echo -e "\tfi;" >> $MKFILE.tmp
    352356      fi
    353357    fi
    354     if [ "$i" = "027-binutils-pass1" -o "$i" = "032-tcl" ] ; then
     358    if [ "$i" = "027-binutils-pass1" -o "$i" = "036-binutils-pass2" ] ; then
    355359      echo -e "\tif [ ! -e \$@ ] ; then \\" >> $MKFILE.tmp
    356360      echo -e "\t\tROOT=\`head -n1 /tmp/unpacked | sed 's@/.*@@'\` && \\" >> $MKFILE.tmp
    357361      echo -e "\t\trm -r \$(LFS)\$(SRC)/\$\$ROOT && \\" >> $MKFILE.tmp
    358       echo -e "\t\tif [ -e \$(LFS)\$(SRC)/*-build ]; then \\" >> $MKFILE.tmp
    359       echo -e "\t\t\trm -r \$(LFS)\$(SRC)/*-build; \\" >> $MKFILE.tmp
    360       echo -e "\t\tfi;" >> $MKFILE.tmp
     362      echo -e "\t\trm -r \$(LFS)\$(SRC)/binutils-build; \\" >> $MKFILE.tmp
    361363      echo -e "\tfi;" >> $MKFILE.tmp
    362364    fi
    363 
    364     # Remove the Binutils sources after a sucessfull adjusting phase.
     365    if [ "$i" = "032-tcl" ] ; then
     366      echo -e "\tif [ ! -e \$@ ] ; then \\" >> $MKFILE.tmp
     367      echo -e "\t\tROOT=\`head -n1 /tmp/unpacked | sed 's@/.*@@'\` && \\" >> $MKFILE.tmp
     368      echo -e "\t\trm -r \$(LFS)\$(SRC)/\$\$ROOT; \\" >> $MKFILE.tmp
     369      echo -e "\tfi;" >> $MKFILE.tmp
     370    fi
     371
     372    # Remove the Binutils pass 1 sources after a sucessfull Adjusting phase.
    365373    if [ "$i" = "031-adjusting" ] ; then
    366374      echo -e "\tif [ -e \$@ ] ; then \\" >> $MKFILE.tmp
    367375      echo -e "\t\trm -r \`cat sources-dir\` && \\" >> $MKFILE.tmp
    368       echo -e "\t\trm -r \$(LFS)\$(SRC)/binutils-build; && \\" >> $MKFILE.tmp
    369       echo -e "\t\trm sources-dir && \\" >> $MKFILE.tmp
     376      echo -e "\t\trm -r \$(LFS)\$(SRC)/binutils-build && \\" >> $MKFILE.tmp
     377      echo -e "\t\trm sources-dir; \\" >> $MKFILE.tmp
    370378      echo -e "\tfi;" >> $MKFILE.tmp
    371379    fi
     
    375383      echo -e "\tif [ -e \$@ ] ; then \\" >> $MKFILE.tmp
    376384      echo -e "\t\trm -r \`cat sources-dir\` && \\" >> $MKFILE.tmp
    377       echo -e "\t\trm sources-dir && \\" >> $MKFILE.tmp
     385      echo -e "\t\trm sources-dir; \\" >> $MKFILE.tmp
    378386      echo -e "\tfi;" >> $MKFILE.tmp
    379387    fi
     
    460468
    461469run_make() {
    462   # Build the system
    463   if [ -e $MKFILE ] ; then
    464     echo -ne "Building the LFS system\n"
    465     cd $JHALFSDIR && make
    466     echo -ne "done\n"
     470  # Test if make must be run.
     471  if [ "$RUNMAKE" = "1" ] ; then
     472    # Build the system
     473    if [ -e $MKFILE ] ; then
     474      echo -ne "Building the LFS system\n"
     475      cd $JHALFSDIR && make
     476      echo -ne "done\n"
     477    fi
    467478  fi
    468479}
Note: See TracChangeset for help on using the changeset viewer.