From a41ce586b17c5e86007b8dd77cf87c0ea350a6aa Mon Sep 17 00:00:00 2001 From: Manuel Canales Esparcia Date: Thu, 6 Oct 2005 21:09:53 +0000 Subject: [PATCH] Setting the PAGE envar needed build Groff. Added --page_size switch to can change the PAGE value. --- dump-lfs-scripts.xsl | 13 ++++++++++--- jhalfs | 32 ++++++++++++++++++++++++++++---- 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/dump-lfs-scripts.xsl b/dump-lfs-scripts.xsl index 34ce6a5..7b1bff8 100644 --- a/dump-lfs-scripts.xsl +++ b/dump-lfs-scripts.xsl @@ -113,9 +113,16 @@ - **EDITME - - EDITME** + + + $PAGE + + + **EDITME + + EDITME** + + diff --git a/jhalfs b/jhalfs index 73cb362..f276f57 100755 --- a/jhalfs +++ b/jhalfs @@ -18,23 +18,28 @@ Options: -V, --version print version number, then exit - -d --directory=DIR use DIR directory for building LFS; all files + -d --directory DIR use DIR directory for building LFS; all files jhalfs produces will be in the directory DIR/jhalfs -P, --get-packages download the packages and patches - -D, --download-client=CLIENT use CLIENT as the program for retrieving + -D, --download-client CLIENT use CLIENT as the program for retrieving packages (for use in conjunction with -P) - -W, --working-copy=DIR use the local working copy placed in DIR + -W, --working-copy DIR use the local working copy placed in DIR as the LFS book - -L, --LFS-version=VER ckeckout VER version of the LFS book + -L, --LFS-version VER ckeckout VER version of the LFS book -T, --testsuites add support to run the optional testsuites -M, --run-make run make on the generated Makefile + + --page_size PAGE set PAGE as the default page size (letter, + A4, or others). This setting is required to + build Groff. If no speciffied, \"letter\" + will be used. " help="\ @@ -113,6 +118,13 @@ while test $# -gt 0 ; do shift ;; + --page_size ) + test $# = 1 && eval "$exit_missing_arg" + shift + PAGE=$1 + shift + ;; + * ) echo "$usage" exit 1 @@ -149,6 +161,7 @@ MKFILE=$JHALFSDIR/Makefile XSL=dump-lfs-scripts.xsl FNC=functions if [ -z $TEST ] ; then TEST=0 ; fi +if [ -z $PAGE ] ; then PAGE=letter ; fi HEADER="# This file is automatically generated by jhalfs # DO NOT EDIT THIS FILE MANUALLY @@ -545,6 +558,16 @@ EOF ) >> $MKFILE.tmp fi + # For Groff we need to set PAGE envar. + if [ "$i" = "082-groff" ] ; then +( + cat << EOF + @echo "PAGE=\$(PAGE)" >> envars && \\ + echo "export PAGE" >> envars +EOF +) >> $MKFILE.tmp + fi + # In the mount of kernel filesystems we need to set LFS for CHROOT1 # and not to use chroot. if [ "$i" = "057-kernfs" ] ; then @@ -612,6 +635,7 @@ $HEADER SRC= /sources LFS= $BUILDDIR +PAGE= $PAGE include functions