r2084 - jhalfs/trunk

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Thu Oct 6 14:09:54 PDT 2005


Author: manuel
Date: 2005-10-06 15:09:53 -0600 (Thu, 06 Oct 2005)
New Revision: 2084

Modified:
   jhalfs/trunk/dump-lfs-scripts.xsl
   jhalfs/trunk/jhalfs
Log:
Setting the PAGE envar needed build Groff.
Added --page_size switch to can change the PAGE value.

Modified: jhalfs/trunk/dump-lfs-scripts.xsl
===================================================================
--- jhalfs/trunk/dump-lfs-scripts.xsl	2005-10-06 18:03:52 UTC (rev 2083)
+++ jhalfs/trunk/dump-lfs-scripts.xsl	2005-10-06 21:09:53 UTC (rev 2084)
@@ -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>

Modified: jhalfs/trunk/jhalfs
===================================================================
--- jhalfs/trunk/jhalfs	2005-10-06 18:03:52 UTC (rev 2083)
+++ jhalfs/trunk/jhalfs	2005-10-06 21:09:53 UTC (rev 2084)
@@ -18,23 +18,28 @@
 
   -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 @@
       shift
       ;;
 
+    --page_size )
+      test $# = 1 && eval "$exit_missing_arg"
+      shift
+      PAGE=$1
+      shift
+      ;;
+
     * )
       echo "$usage"
       exit 1
@@ -149,6 +161,7 @@
 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 @@
 ) >> $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 @@
 
 SRC= /sources
 LFS= $BUILDDIR
+PAGE= $PAGE
 
 include functions
 




More information about the alfs-log mailing list