diff --git a/CLFS/config b/CLFS/config deleted file mode 100644 index 7dc9430..0000000 --- a/CLFS/config +++ /dev/null @@ -1,79 +0,0 @@ -##### -# -# Configuration file for the CLFS module -# -# $Id$ -# -##### - -#--- Which target architecture you want to build for, -# used to select proper book and set TARGETS -#-------------------------------- -TARGET32="" -TARGET= -# >>>> 32-32 BUILD <<<< - ARCH=x86 ; TARGET="i486-pc-linux-gnu" -# ARCH=x86 ; TARGET="i586-pc-linux-gnu" -# ARCH=x86 ; TARGET="i686-pc-linux-gnu" -# ARCH=ppc ; TARGET="powerpc-unknown-linux-gnu" -# ARCH=mips ; TARGET="mipsel-unknown-linux-gnu" -# ARCH=mips ; TARGET="mips-unknown-linux-gnu" -# ARCH=sparc ; TARGET="sparcv9-unknown-linux-gnu" -#-------------------------------- -# >>>> 64-64 BUILD <<<< -# ARCH=x86_64-64 ; TARGET="x86_64-unknown-linux-gnu" -# ARCH=mips64-64 ; TARGET="mips64el-unknown-linux-gnu" -# ARCH=mips64-64 ; TARGET="mips64-unknown-linux-gnu" -# ARCH=sparc64-64 ; TARGET="sparc64-unknown-linux-gnu" -# ARCH=alpha ; TARGET="alpha-unknown-linux-gnu" -#-------------------------------- -# >>>> MULTILIB 32/64 <<<< -# ARCH=x86_64 ; TARGET="x86_64-unknown-linux-gnu" ; TARGET32="i686-pc-linux-gnu" -# ARCH=mips64 ; TARGET="mips64el-unknown-linux-gnu" ; TARGET32="mipsel-unknown-linux-gnu" -# ARCH=mips64 ; TARGET="mips64-unknown-linux-gnu" ; TARGET32="mips-unknown-linux-gnu" -# ARCH=sparc64 ; TARGET="sparc64-unknown-linux-gnu" ; TARGET32="sparc-unknown-linux-gnu" -# ARCH=ppc64 ; TARGET="powerpc64-unknown-linux-gnu" ; TARGET32="powerpc-unknown-linux-gnu" - -#--- What build method should be used chroot/boot -# NOTE: not all combinations are 'bootable' yet. -METHOD=chroot - -#--- Unprivileged user and group name -LUSER=clfs -LGROUP=clfs - -#--- Location of fstab file (if empty, a template is created) -FSTAB= - -#--- Fully qualified path to a kernel config file -# If no config file is specified the kernel is NOT compiled -CONFIG= - -#--- If METHOD=boot, location of boot-kernel config file -# NOTE: this setting is required -BOOT_CONFIG= - -# Get the kernel package and patches even if no configutation file -# has been supplied? n(no)/y(yes) -GETKERNEL=n - -#--- Book's sources directory -# If you have previously checked out the book from the repository -BOOK= - -#==== INTERNAL VARIABLES ==== -# Don't edit it unless you know what you are doing - -#--- Extra files that need be copied to $JHALFSDIR -FILES="" - -#--- Default stylesheet -XSL=clfs.xsl - -#--- Book version -LFSVRS=development -TREE=trunk/BOOK - -#--- Name of the makefile -MKFILE=$JHALFSDIR/Makefile - diff --git a/CLFS2/config b/CLFS2/config deleted file mode 100644 index 9715548..0000000 --- a/CLFS2/config +++ /dev/null @@ -1,58 +0,0 @@ -##### -# -# Configuration file for the CLFS module -# -# $Id$ -# -##### - -#--- Which target architecture you want to build for, -# used to select proper book and set TARGETS -#-------------------------------- -TARGET= -TARGET32= -# >>>> 32-32 BUILD <<<< - ARCH=x86 ; TARGET="i486-pc-linux-gnu" -# ARCH=x86 ; TARGET="i586-pc-linux-gnu" -# ARCH=x86 ; TARGET="i686-pc-linux-gnu" -# ARCH=arm ; TARGET="arm-unknown-linux-gnu" -#-------------------------------- -# >>>> 64-64 BUILD <<<< -#-------------------------------- -# >>>> MULTILIB 32/64 <<<< - -#--- Unprivileged user and group name -LUSER=clfs -LGROUP=clfs - -#--- Location of fstab file (if empty, a template is created) -FSTAB= - -#--- Fully qualified path to a kernel config file -# If no config file is specified the kernel is NOT compiled -CONFIG= - -# Get the kernel package and patches even if no configutation file -# has been supplied? n(no)/y(yes) -GETKERNEL=n - -#--- Book's sources directory -# If you have previously checked out the book from the repository -BOOK= - -#==== INTERNAL VARIABLES ==== -# Don't edit it unless you know what you are doing - -#--- Extra files that need be copied to $JHALFSDIR -FILES="" - -#--- Default stylesheet -XSL=clfs2.xsl - -#--- Book version -LFSVRS=development -TREE=branches/clfs-2.0/BOOK - -#--- Name of the makefile -MKFILE=$JHALFSDIR/Makefile - diff --git a/HLFS/config b/HLFS/config deleted file mode 100644 index e643b0c..0000000 --- a/HLFS/config +++ /dev/null @@ -1,48 +0,0 @@ -##### -# -# Configuration file for the HLFS module -# -# $Id$ -# -##### - -#--- Which library model to use uclibc/glibc -MODEL=glibc - -#--- The host system has grsecurity options enabled? n(no)/y(yes) -GRSECURITY_HOST=n - -#--- Unprivileged user and group name -LUSER=hlfs -LGROUP=hlfs - -#--- Location of fstab file (if empty, a template is created) -FSTAB= - -#--- Fully qualified path to a kernel config file -# If no config file is specified the kernel is NOT compiled -CONFIG= - -# Get the kernel package and patches even if no configutation file -# has been supplied? n(no)/y(yes) -GETKERNEL=n - -#--- Book's sources directory -# If you have previously checked out the book from the repository -BOOK= - -#==== INTERNAL VARIABLES ==== -# Don't edit it unless you know what you are doing - -#--- Extra files that need be copied to $JHALFSDIR -FILES="" - -#--- Default stylesheet -XSL=hlfs.xsl - -#--- Book version -LFSVRS=development -TREE=trunk/BOOK - -#--- Name of the makefile -MKFILE=$JHALFSDIR/Makefile diff --git a/LFS/config b/LFS/config deleted file mode 100644 index 84538be..0000000 --- a/LFS/config +++ /dev/null @@ -1,42 +0,0 @@ -##### -# -# Configuration file for the LFS module -# -# $Id$ -# -##### - -#--- Unprivileged user and group name -LUSER=lfs -LGROUP=lfs - -#--- Location of fstab file (if empty, a template is created) -FSTAB= - -#--- Fully qualified path to a kernel config file -# If no config file is specified the kernel is NOT compiled -CONFIG= - -# Get the kernel package and patches even if no configuration file -# has been supplied? n(no)/y(yes) -GETKERNEL=n - -#--- Book's sources directory -# If you have previously checked out the book from the repository -BOOK= - -#==== INTERNAL VARIABLES ==== -# Don't edit it unless you know what you are doing - -#--- Extra files that need be copied to $JHALFSDIR -FILES="" - -#--- Default stylesheet -XSL=lfs.xsl - -#--- Book version -LFSVRS=development -TREE=trunk/BOOK - -#--- Name of the makefile -MKFILE=$JHALFSDIR/Makefile diff --git a/Makefile b/Makefile index d73426a..73a1324 100644 --- a/Makefile +++ b/Makefile @@ -8,10 +8,7 @@ CONFIG = menu all: menuconfig @clear - @touch using_menuconfig - @`grep RUN_ME configuration | sed -e 's@RUN_ME=\"@@' -e 's@\"@@' ` || rm -f using_menuconfig - @rm -f using_menuconfig - + @`grep RUN_ME configuration | sed -e 's@RUN_ME=\"@@' -e 's@\"@@' ` $(CONFIG)/conf: $(MAKE) -C $(CONFIG) conf diff --git a/common/config b/common/config deleted file mode 100644 index 5e0d451..0000000 --- a/common/config +++ /dev/null @@ -1,110 +0,0 @@ -##### -# -# common configuration file -# -# $Id$ -##### - -declare -r SVN="svn://svn.linuxfromscratch.org" -declare -r LOG=000-masterscript.log - -#--- Mount point for the build -BUILDDIR=/mnt/build_dir - -# Create SBU and disk usage report n(no)/y(yes) -# NOTE: requires to have bc installed on the host -REPORT=y - -#=== Getting packages === -# Files will be retrieved from the local archive SRC_ARCHIVE -# (if defined) or the 'net and will be stored in $BUILDDIR/sources -#--- Download the source packages n(no)/y(yes) -GETPKG=n - -#--- The local repository for packages/file -# Used only if GETPKG = y -# Any missing file will be downloaded and archived here, -# if the user has the right priviledges. -SRC_ARCHIVE=$SRC_ARCHIVE - -# --- Server used if the file isn't found in SRC_ARCHIVE. -# As a last resort, the file will dowloaded from upstream, if possible. -SERVER=ftp://ftp.lfs-matrix.net - -#=== Build options === -#--- Automatically run the makefile once it has been created n(no)/y(yes) -RUNMAKE=n - -#--- Optimize the build [0-2] -# 0 = no optimization -# 1 = optimize final system only -# 2 = optimize both temporary tools and final system -# -# Optimization values are set in optimize/* files -OPTIMIZE=0 - -#--- Run test suites [0-3] -# 0 = none -# 1 = only chapter06 Glibc, GCC and Binutils testsuites -# 2 = all chapter06 testsuites -# 3 = all chapter05 and chapter06 testsuites -# (in CLFS and HLFS, alias to 2) -TEST=1 - -#--- Bomb on test suites failures? -# n = no, I want to build the full system and review the logs -# y = yes, bomb at the first test suite failure to can review the build dir -BOMB_TEST=n - -#--- Run the stripping phases n(no)/y(yes) -STRIP=y - -#--- page definition for groff letter/A4 -PAGE=letter - -#--- set default timezone. -TIMEZONE=${TZ:-GMT} - -#--- install the optional vim-lang package n(no)/y(yes) -VIMLANG=y - -#--- Language information in /etc/profile See for values -LANG=$LANG -LC_ALL=$LC_ALL # (not used in LFS) - -#--- Include the keymap in the kernel if defined. Path to the -# keymap file relative to /usr/share/kbd/keymaps/ -# (e.g., i386/qwerty/us.map.gz) or "none" -# Not used in LFS -KEYMAP=none - -#=== Variables needed by iterative comparison analysis === -#--- Should some iterative comparison analysis by made? n(no)/y(yes) -COMPARE=n - -#--- The number of final stage builds to create and compare, min. 2, max. 5 -ITERATIONS=3 - -#--- Run ICA testing n(no)/y(yes) -RUN_ICA=n - -#--- Run farce testing n(no)/y(yes) -RUN_FARCE=n - -#==== INTERNAL VARIABLES ==== -# Don't edit it unless you know what you are doing - -#--- Working directories -SCRIPT_ROOT=jhalfs - JHALFSDIR=$BUILDDIR/$SCRIPT_ROOT - LOGDIR=$JHALFSDIR/logs - TESTLOGDIR=$JHALFSDIR/test-logs - -#--- File listing package contents (from where package sources dir is extracted) -PKG_LST=unpacked - -#--- ICA report log directory -ICALOGDIR=$LOGDIR/ICA - -#--- farce report log directory -FARCELOGDIR=$LOGDIR/farce diff --git a/master.sh b/master.sh index e8ae4f3..7e0091b 100755 --- a/master.sh +++ b/master.sh @@ -39,47 +39,45 @@ if [ ! -L $0 ] ; then exit 1 fi - PROGNAME=$(basename $0) - COMMON_DIR="common" - PACKAGE_DIR=$(echo $PROGNAME | tr [a-z] [A-Z]) - MODULE=$PACKAGE_DIR/master.sh -MODULE_CONFIG=$PACKAGE_DIR/config - VERBOSITY=0 + PROGNAME=$(basename $0) + COMMON_DIR="common" +PACKAGE_DIR=$(echo $PROGNAME | tr [a-z] [A-Z]) + MODULE=$PACKAGE_DIR/master.sh + VERBOSITY=1 -if [[ -e using_menuconfig ]]; then - [[ $VERBOSITY > 0 ]] && echo -n "Loading config params from ..." - source configuration - [[ $? > 0 ]] && echo "file:configuration did not load.." && exit 1 - [[ $VERBOSITY > 0 ]] && echo "OK" +[[ $VERBOSITY > 0 ]] && echo -n "Loading config params from ..." +source configuration +[[ $? > 0 ]] && echo "file:configuration did not load.." && exit 1 +[[ $VERBOSITY > 0 ]] && echo "OK" - #--- CONSTANTS - declare -r SVN="svn://svn.linuxfromscratch.org" - declare -r LOG=000-masterscript.log - # --- Server used if the file isn't found in SRC_ARCHIVE. - # As a last resort, the file will dowloaded from upstream, if possible. - SERVER=ftp://ftp.lfs-matrix.net - #--- Working directories - SCRIPT_ROOT=jhalfs - JHALFSDIR=$BUILDDIR/$SCRIPT_ROOT - LOGDIR=$JHALFSDIR/logs - TESTLOGDIR=$JHALFSDIR/test-logs - MKFILE=$JHALFSDIR/Makefile - #--- ICA report log directory - ICALOGDIR=$LOGDIR/ICA - #--- farce report log directory - FARCELOGDIR=$LOGDIR/farce - XSL=$PROGNAME.xsl - PKG_LST=unpacked + #--- CONSTANTS +declare -r SVN="svn://svn.linuxfromscratch.org" +declare -r LOG=000-masterscript.log + # --- Server used if the file isn't found in SRC_ARCHIVE. + # As a last resort, the file will dowloaded from upstream, if possible. + SERVER=ftp://ftp.lfs-matrix.net + #--- Working directories +SCRIPT_ROOT=jhalfs + JHALFSDIR=$BUILDDIR/$SCRIPT_ROOT + LOGDIR=$JHALFSDIR/logs + TESTLOGDIR=$JHALFSDIR/test-logs + MKFILE=$JHALFSDIR/Makefile + #--- ICA report log directory + ICALOGDIR=$LOGDIR/ICA + #--- farce report log directory +FARCELOGDIR=$LOGDIR/farce + XSL=$PROGNAME.xsl + PKG_LST=unpacked - case $PROGNAME in - clfs2) LFSVRS=development; TREE=branches/clfs-2.0/BOOK ;; - *) LFSVRS=development; TREE=trunk/BOOK ;; - esac +case $PROGNAME in + clfs2) LFSVRS=development; TREE=branches/clfs-2.0/BOOK ;; + *) LFSVRS=development; TREE=trunk/BOOK ;; +esac - if [[ ! -z ${BRANCH_ID} ]]; then - case $BRANCH_ID in - dev* | SVN | trunk ) +if [[ ! -z ${BRANCH_ID} ]]; then + case $BRANCH_ID in + dev* | SVN | trunk ) case $PROGNAME in clfs2 ) TREE=branches/clfs-2.0/BOOK ;; *) TREE=trunk/BOOK ;; @@ -87,55 +85,41 @@ if [[ -e using_menuconfig ]]; then LFSVRS=development ;; branch-* ) - LFSVRS=${BRANCH_ID} - TREE=branches/${BRANCH_ID#branch-}/BOOK + LFSVRS=${BRANCH_ID} + TREE=branches/${BRANCH_ID#branch-}/BOOK ;; * ) case $PROGNAME in lfs | hlfs ) - LFSVRS=${BRANCH_ID} + LFSVRS=${BRANCH_ID} TREE=tags/${BRANCH_ID}/BOOK - ;; + ;; clfs | clfs2 ) - LFSVRS=${BRANCH_ID} - TREE=tags/${BRANCH_ID} - ;; + LFSVRS=${BRANCH_ID} + TREE=tags/${BRANCH_ID} + ;; esac ;; - esac - fi - # These are boolean vars generated from Config.in. - # ISSUE: If a boolean parameter is not set that - # variable is not defined by the menu app. This can - # cause a headache if you are not careful. - # The following parameters MUST be created and have a - # default value. - RUNMAKE=${RUNMAKE:-n} - GETPKG=${GETPKG:-n} - GETKERNEL=${GETKERNEL:-n} - COMPARE=${COMPARE:-n} - RUN_FARCE=${RUN_FARCE:-n} - RUN_ICA=${RUN_ICA:-n} - BOMB_TEST=${BOMB_TEST:-n} - STRIP=${STRIP:=n} - REPORT=${REPORT:=n} - VIMLANG=${VIMLANG:-n} - KEYMAP=${KEYMAP:=none} - GRSECURITY_HOST=${GRSECURITY_HOST:-n} - -else - # - [[ $VERBOSITY > 0 ]] && echo -n "Loading masterscript conf..." - source $COMMON_DIR/config - [[ $? > 0 ]] && echo "$COMMON_DIR/conf did not load.." && exit - [[ $VERBOSITY > 0 ]] && echo "OK" - # - [[ $VERBOSITY > 0 ]] && echo -n "Loading config module <$MODULE_CONFIG>..." - source $MODULE_CONFIG - [[ $? > 0 ]] && echo "$MODULE_CONFIG did not load.." && exit 1 - [[ $VERBOSITY > 0 ]] && echo "OK" - # + esac fi +# These are boolean vars generated from Config.in. +# ISSUE: If a boolean parameter is not set that +# variable is not defined by the menu app. This can +# cause a headache if you are not careful. +# The following parameters MUST be created and have a +# default value. +RUNMAKE=${RUNMAKE:-n} +GETPKG=${GETPKG:-n} +GETKERNEL=${GETKERNEL:-n} +COMPARE=${COMPARE:-n} +RUN_FARCE=${RUN_FARCE:-n} +RUN_ICA=${RUN_ICA:-n} +BOMB_TEST=${BOMB_TEST:-n} +STRIP=${STRIP:=n} +REPORT=${REPORT:=n} +VIMLANG=${VIMLANG:-n} +KEYMAP=${KEYMAP:=none} +GRSECURITY_HOST=${GRSECURITY_HOST:-n} [[ $VERBOSITY > 0 ]] && echo -n "Loading common-functions module..." @@ -154,9 +138,15 @@ source $MODULE # If the var BOOK contains something then, maybe, it points # to a working doc.. set WC=1, else 'null' #=========================================================== -WC=${BOOK:+1} +WC=${BOOK:+y} #=========================================================== +#=================================================== +# Set the document location... +#=================================================== +BOOK=${BOOK:=$PROGNAME-$LFSVRS} +#=================================================== + #*******************************************************************# [[ $VERBOSITY > 0 ]] && echo -n "Loading function ..." @@ -175,271 +165,6 @@ source $COMMON_DIR/func_validate_configs.sh ### MAIN ### ################################### -# Evaluate any command line switches - -while test $# -gt 0 ; do - case $1 in - # Common options for {C,H}LFS books - --book | -B ) - test $# = 1 && eval "$exit_missing_arg" - shift - case $1 in - dev* | SVN | trunk ) - LFSVRS=development - TREE=trunk/BOOK - ;; - branch-* ) - LFSVRS=$1 - TREE=branches/${1#branch-}/BOOK - ;; - * ) - case $PROGNAME in - lfs | hlfs ) - LFSVRS=$1 - TREE=tags/$1/BOOK - ;; - clfs ) - LFSVRS=$1 - TREE=tags/$1 - ;; - esac - ;; - esac - ;; - - --directory | -D ) - test $# = 1 && eval "$exit_missing_arg" - shift - case $1 in - -* ) - echo -e "\n$1 isn't a valid build directory." - echo -e "Directory names can't start with - .\n" - exit 1 - ;; - * ) - BUILDDIR=$1 - JHALFSDIR=$BUILDDIR/${SCRIPT_ROOT} - LOGDIR=$JHALFSDIR/logs - TESTLOGDIR=$JHALFSDIR/test-logs - MKFILE=$JHALFSDIR/Makefile - ;; - esac - ;; - - --get-packages | -G ) GETPKG=y ;; - - --help | -h ) usage | more && exit ;; - - --optimize | -O ) - test $# = 1 && eval "$exit_missing_arg" - shift - case $1 in - 0 | 1 | 2 ) - OPTIMIZE=$1 - ;; - * ) - echo -e "\n$1 isn't a valid optimize level value." - echo -e "You must use 0, 1, or 2.\n" - exit 1 - ;; - esac - ;; - - --testsuites | -T ) - test $# = 1 && eval "$exit_missing_arg" - shift - case $1 in - 0 | 1 | 2 | 3 ) - TEST=$1 - ;; - * ) - echo -e "\n$1 isn't a valid testsuites level value." - echo -e "You must to use 0, 1, 2, or 3.\n" - exit 1 - ;; - esac - ;; - - --version | -V ) - echo "$version" - exit 0 - ;; - - --working-copy | -W ) - test $# = 1 && eval "$exit_missing_arg" - shift - case $PROGNAME in # Poor checks. We should find better ones. - lfs) - if [ -d $1/chapter09 ] ; then - WC=1 - BOOK=$1 - else - echo -e "\nLooks like $1 isn't an LFS working copy." - exit 1 - fi - ;; - clfs) - if [ -d $1/cross-tools ] ; then - WC=1 - BOOK=$1 - else - echo -e "\nLooks like $1 isn't a CLFS working copy." - exit 1 - fi - ;; - hlfs) - if [ -f $1/template.xml ] ; then - WC=1 - BOOK=$1 - else - echo -e "\nLooks like $1 isn't an HLFS working copy." - exit 1 - fi - ;; - esac - ;; - - --comparison | -C ) - test $# = 1 && eval "$exit_missing_arg" - shift - case $1 in - ICA) RUN_ICA=y; RUN_FARCE=n; COMPARE=y ;; - farce) RUN_ICA=n; RUN_FARCE=y; COMPARE=y ;; - both) RUN_ICA=y; RUN_FARCE=y; COMPARE=y ;; - *) - echo -e "\n$1 is an unknown analysis method." - exit 1 - ;; - esac - ;; - - --fstab | -F ) - test $# = 1 && eval "$exit_missing_arg" - shift - if [ -f $1 ] ; then - FSTAB=$1 - else - echo -e "\nFile $1 not found. Verify your command line.\n" - exit 1 - fi - ;; - - --kernel-config | -K ) - test $# = 1 && eval "$exit_missing_arg" - shift - if [ -f $1 ] ; then - CONFIG=$1 - else - echo -e "\nFile $1 not found. Verify your command line.\n" - exit 1 - fi - ;; - - --run-make | -M ) RUNMAKE=y ;; - - --rebuild | -R ) CLEAN=y ;; - - # CLFS options - --arch | -A ) - test $# = 1 && eval "$exit_missing_arg" - shift - case $PROGNAME in - CLFS2) - case $1 in - arm) ARCH=arm; TARGET="arm-unknown-linux-gnu" ;; - x86) ARCH=x86; TARGET="i686-pc-linux-gnu" ;; - *) echo -e "\n$1 is an unknown or unsupported arch."; exit 1 - esac - ;; - CLFS) - case $1 in - arm ) ARCH=arm; TARGET="arm-unknown-linux-gnu" ;; - x86 ) ARCH=x86; TARGET="i686-pc-linux-gnu" ;; - i486 ) ARCH=x86; TARGET="i486-pc-linux-gnu" ;; - i586 ) ARCH=x86; TARGET="i586-pc-linux-gnu" ;; - ppc ) ARCH=ppc; TARGET="powerpc-unknown-linux-gnu" ;; - mips ) ARCH=mips; TARGET="mips-unknown-linux-gnu" ;; - mipsel ) ARCH=mips; TARGET="mipsel-unknown-linux-gnu" ;; - sparc ) ARCH=sparc; TARGET="sparcv9-unknown-linux-gnu" ;; - - x86_64-64 ) ARCH=x86_64-64; TARGET="x86_64-unknown-linux-gnu" ;; - mips64-64 ) ARCH=mips64-64; TARGET="mips-unknown-linux-gnu" ;; - mipsel64-64 ) ARCH=mips64-64; TARGET="mipsel-unknown-linux-gnu" ;; - sparc64-64 ) ARCH=sparc64-64; TARGET="sparc64-unknown-linux-gnu" ;; - alpha ) ARCH=alpha; TARGET="alpha-unknown-linux-gnu" ;; - - x86_64 ) ARCH=x86_64; TARGET="x86_64-unknown-linux-gnu"; TARGET32="i686-pc-linux-gnu" ;; - mips64 ) ARCH=mips64; TARGET="mips-unknown-linux-gnu"; TARGET32="mips-unknown-linux-gnu" ;; - mipsel64 ) ARCH=mips64; TARGET="mipsel-unknown-linux-gnu"; TARGET32="mipsel-unknown-linux-gnu" ;; - sparc64 ) ARCH=sparc64; TARGET="sparc64-unknown-linux-gnu"; TARGET32="sparcv9-unknown-linux-gnu" ;; - ppc64 ) ARCH=ppc64; TARGET="powerpc64-unknown-linux-gnu"; TARGET32="powerpc-unknown-linux-gnu" ;; - - * ) echo -e "\n$1 is an unknown or unsupported arch."; exit 1 ;; - esac - ;; - esac - ;; - - --boot-config ) - test $# = 1 && eval "$exit_missing_arg" - shift - if [ -f $1 ] ; then - BOOT_CONFIG=$1 - else - echo -e "\nFile $1 not found. Verify your command line.\n" - exit 1 - fi - ;; - - --method ) - test $# = 1 && eval "$exit_missing_arg" - shift - case $1 in - chroot | boot ) - METHOD=$1 - ;; - * ) - echo -e "\n$1 isn't a valid build method." - exit 1 - ;; - esac - ;; - - # HLFS options - --model ) - test $# = 1 && eval "$exit_missing_arg" - shift - case $1 in - glibc | uclibc ) - MODEL=$1 - ;; - * ) - echo -e "\n$1 isn't a valid libc model." - exit 1 - ;; - esac - ;; - - # Unknown options - * ) usage ;; - esac - shift -done - - -#=================================================== -# Set the document location... -# BOOK is either defined in -# xxx.config -# comand line -# default -# If set by conf file or cmd line leave it -# alone otherwise load the default version -#=================================================== -BOOK=${BOOK:=$PROGNAME-$LFSVRS} -#=================================================== - - # Check for minimum bash,tar,gcc and kernel versions echo check_version "2.6.2" "`uname -r`" "KERNEL" @@ -511,37 +236,35 @@ fi # [[ "$TEST" != "0" ]] && [[ ! -d $TESTLOGDIR ]] && install -d -m 1777 $TESTLOGDIR # -if [[ "$PWD" != "$JHALFSDIR" ]]; then - cp $COMMON_DIR/{makefile-functions,progress_bar.sh} $JHALFSDIR/ - # - [[ "$OPTIMIZE" != "0" ]] && cp optimize/opt_override $JHALFSDIR/ - # - if [[ "$COMPARE" = "y" ]]; then - mkdir -p $JHALFSDIR/extras - cp extras/* $JHALFSDIR/extras - fi - # - if [[ -n "$FILES" ]]; then - # pushd/popd necessary to deal with multiple files - pushd $PACKAGE_DIR 1> /dev/null - cp $FILES $JHALFSDIR/ - popd 1> /dev/null - fi - # - if [[ "$REPORT" = "y" ]]; then - cp $COMMON_DIR/create-sbu_du-report.sh $JHALFSDIR/ - # After being sure that all looks sane, dump the settings to a file - # This file will be used to create the REPORT header - validate_config > $JHALFSDIR/jhalfs.config - fi - # - [[ "$GETPKG" = "y" ]] && cp $COMMON_DIR/urls.xsl $JHALFSDIR/ - # - cp $COMMON_DIR/packages.xsl $JHALFSDIR/ - # - sed 's,FAKEDIR,'$BOOK',' $PACKAGE_DIR/$XSL > $JHALFSDIR/${XSL} - export XSL=$JHALFSDIR/${XSL} +cp $COMMON_DIR/{makefile-functions,progress_bar.sh} $JHALFSDIR/ +# +[[ "$OPTIMIZE" != "0" ]] && cp optimize/opt_override $JHALFSDIR/ +# +if [[ "$COMPARE" = "y" ]]; then + mkdir -p $JHALFSDIR/extras + cp extras/* $JHALFSDIR/extras fi +# +if [[ -n "$FILES" ]]; then + # pushd/popd necessary to deal with multiple files + pushd $PACKAGE_DIR 1> /dev/null + cp $FILES $JHALFSDIR/ + popd 1> /dev/null +fi +# +if [[ "$REPORT" = "y" ]]; then + cp $COMMON_DIR/create-sbu_du-report.sh $JHALFSDIR/ + # After being sure that all looks sane, dump the settings to a file + # This file will be used to create the REPORT header + validate_config > $JHALFSDIR/jhalfs.config +fi +# +[[ "$GETPKG" = "y" ]] && cp $COMMON_DIR/urls.xsl $JHALFSDIR/ +# +cp $COMMON_DIR/packages.xsl $JHALFSDIR/ +# +sed 's,FAKEDIR,'$BOOK',' $PACKAGE_DIR/$XSL > $JHALFSDIR/${XSL} +export XSL=$JHALFSDIR/${XSL} get_book echo "${SD_BORDER}${nl_}"