Changeset 48d7968


Ignore:
Timestamp:
09/12/2005 02:04:26 AM (19 years ago)
Author:
Jeremy Huntwork <jhuntwork@…>
Branches:
0.2, 1.0, 2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
Children:
9e406b5
Parents:
e2caf6f
Message:

Make LFS a variable make understands and add a switch to allow user to specify

File:
1 edited

Legend:

Unmodified
Added
Removed
  • jhalfs

    re2caf6f r48d7968  
    1515  -V, --version                 print version number, then exit
    1616  -L, --LFS-version=VER         use VER version of the LFS book
     17  -d  --directory=DIR           use DIR directory for building LFS; all files
     18                                jhalfs produces will be in the directory
     19                                DIR/jhalfs
    1720  -D, --download-client=CLIENT  use CLIENT as the program for retrieving
    1821                                packages
     
    5861                        ;;
    5962
     63                --directory | -d )
     64                        test $# = 1 && eval "$exit_missing_arg"
     65                        shift
     66                        BUILDDIR=$1
     67                        shift
     68                        ;;
     69
    6070                --download-client | -D )
    6171                        test $# = 1 && eval "$exit_missing_arg"
     
    93103SVN="svn://svn.linuxfromscratch.org"
    94104HTTP=http://ftp.lfs-matrix.net/pub/lfs/lfs-packages/conglomeration
    95 BUILDDIR=/mnt/lfs
     105if [ -z $BUILDDIR ] ; then BUILDDIR=/mnt/lfs ; fi
    96106JHALFSDIR=$BUILDDIR/jhalfs
    97107LOG=build.log
     
    283293        # Drop in the actual commands that were parsed from the book
    284294        cat $i | sed -e 's:\$:&&:g' -e 's:^:\t:' -e 's:[^\\]$:& \&\& \\:' >> $MKFILE.tmp
    285         sed -i '$s: \&\& \\::' $MKFILE.tmp
     295        sed -i -e '$s: \&\& \\::' $MKFILE.tmp -e 's|\$\$LFS|\$(LFS)|' $MKFILE.tmp
    286296
    287297        # Include a touch of the target name so make can check if it's already been made.
     
    291301        # Stick a variable and some defines at the top of the real makefile     
    292302        echo "export SRC := /sources" > $MKFILE
     303        echo "export LFS := $BUILDDIR" >> $MKFILE
    293304        echo "define unpack" >> $MKFILE
    294305        echo -e "\t@cd \$(SRC) ; tar -xvf \$(1) > /tmp/unpacked" >> $MKFILE
Note: See TracChangeset for help on using the changeset viewer.