Setting the PAGE envar needed build Groff.

Added --page_size switch to can change the PAGE value.
This commit is contained in:
Manuel Canales Esparcia 2005-10-06 21:09:53 +00:00
parent 0a9117e6f0
commit a41ce586b1
2 changed files with 38 additions and 7 deletions

View file

@ -113,9 +113,16 @@
</xsl:template>
<xsl:template match="replaceable">
<xsl:text>**EDITME</xsl:text>
<xsl:apply-templates/>
<xsl:text>EDITME**</xsl:text>
<xsl:choose>
<xsl:when test="ancestor::sect1[@id='ch-system-groff']">
<xsl:text>$PAGE</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>**EDITME</xsl:text>
<xsl:apply-templates/>
<xsl:text>EDITME**</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>

32
jhalfs
View file

@ -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