Changeset a5e49c6 for jhalfs


Ignore:
Timestamp:
09/29/2005 10:05:00 PM (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:
0209bb7
Parents:
07f47df
Message:

Added logging capabilities.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • jhalfs

    r07f47df ra5e49c6  
    122122if [ -z $BUILDDIR ] ; then BUILDDIR=/mnt/lfs ; fi
    123123JHALFSDIR=$BUILDDIR/jhalfs
    124 LOG=build.log
     124LOGDIR=$JHALFSDIR/logs
     125LOG=000-jhalfs.log
    125126MKFILE=$JHALFSDIR/Makefile
    126127XSL=dump-commands.xsl
     
    152153  else
    153154    if [ $LFSVRS = development ] ; then
    154       svn co $SVN/LFS/trunk/BOOK lfs-$LFSVRS >>$JHALFSDIR/$LOG 2>&1
     155      svn co $SVN/LFS/trunk/BOOK lfs-$LFSVRS >>$LOGDIR/$LOG 2>&1
    155156    else
    156       svn co $SVN/LFS/branches/$LFSVRS/BOOK lfs-$LFSVRS >>$JHALFSDIR/$LOG 2>&1
     157      svn co $SVN/LFS/branches/$LFSVRS/BOOK lfs-$LFSVRS >>$LOGDIR/$LOG 2>&1
    157158    fi
    158159    echo -ne "done\n"
     
    173174  # Dump the commands in shell script form from the LFS book.
    174175  xsltproc --nonet --xinclude --stringparam testsuite $TEST -o ./commands/ \
    175   $XSL lfs-$LFSVRS/index.xml >>$JHALFSDIR/$LOG 2>&1
     176  $XSL lfs-$LFSVRS/index.xml >>$LOGDIR/$LOG 2>&1
    176177
    177178  # Grab the patches and package names.
     
    302303    # Insert instructions for unpacking the package and to set
    303304    # the PKGDIR variable.
    304     echo -e "\t\$(call unpack-lfs,$FILE) && \\" >> $MKFILE.tmp
     305    echo -e "\t\$(call unpack-lfs,$FILE)" >> $MKFILE.tmp
    305306    echo -e "\tROOT=\`head -n1 /tmp/unpacked | sed 's@/.*@@'\` && \\" >> $MKFILE.tmp
    306307    echo -e "\tchown -R lfs \$(LFS)\$(SRC)/\$\$ROOT && \\" >> $MKFILE.tmp
     
    310311
    311312  # Insert the script run
    312   echo -e "\tsu - lfs -c \". /home/lfs/.bashrc && $JHALFSDIR/commands/$file\" && \\" >> $MKFILE.tmp
    313 
    314   # Include a touch of the target name so make can check
    315   # if it's already been made.
    316   echo -e "\ttouch \$@" >> $MKFILE.tmp
    317 
    318   # Remove the build directory(ies), including if the build has failed.
     313  echo -e "\tsu - lfs -c \". /home/lfs/.bashrc && $JHALFSDIR/commands/$file\" >\$(LOGDIR)/$i.log 2>&1 && \\" >> $MKFILE.tmp
     314
     315  # Remove the build directory(ies).
     316  # (How could it be deleted even if the package build fails?)
    319317  if [ "$vrs" != "" ] ; then
    320318    echo -e "\trm -r \$(LFS)\$(SRC)/\$\$ROOT && \\" >> $MKFILE.tmp
     
    324322  fi
    325323
     324  # Include a touch of the target name so make can check
     325  # if it's already been made.
     326  echo -e "\ttouch \$@" >> $MKFILE.tmp
     327
    326328  done
    327329
    328   # Stick a variable and some defines at the top of the real makefile
     330  # Stick variables and some defines at the top of the real makefile
    329331  echo "export SRC := /sources" > $MKFILE
    330332  echo "export LFS := $BUILDDIR" >> $MKFILE
     333  echo -e "export LOGDIR := $LOGDIR\n" >> $MKFILE
    331334  echo "define unpack-lfs" >> $MKFILE
    332335  echo -e "\t@cd \$(LFS)\$(SRC) ; tar -xvjf \$(1) > /tmp/unpacked" >> $MKFILE
     
    360363  # for the lfs user.
    361364  echo "020-creatingtoolsdir:" >> $MKFILE
    362   echo -e "\tmkdir \$(LFS)/tools && \\" >> $MKFILE
    363   echo -e "\tln -s \$(LFS)/tools / && \\" >> $MKFILE
     365  echo -e "\tmkdir -v \$(LFS)/tools && \\" >> $MKFILE
     366  echo -e "\tln -sv \$(LFS)/tools / && \\" >> $MKFILE
    364367  echo -e "\ttouch \$@\n" >> $MKFILE
    365368
     
    399402fi
    400403
    401 >$JHALFSDIR/$LOG
     404if [ ! -d $LOGDIR ] ; then
     405  mkdir $LOGDIR
     406fi
     407
     408>$LOGDIR/$LOG
    402409
    403410if [ "$PWD" != "$JHALFSDIR" ] ; then
Note: See TracChangeset for help on using the changeset viewer.