r164 - in trunk/BOOK: . stylesheets

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Fri Feb 11 12:59:00 PST 2005


Author: manuel
Date: 2005-02-11 13:59:00 -0700 (Fri, 11 Feb 2005)
New Revision: 164

Modified:
   trunk/BOOK/Makefile
   trunk/BOOK/stylesheets/lfs-chunked.xsl
   trunk/BOOK/stylesheets/lfs-profile.xsl
Log:
Framework to can render both Glibc and uClibc based books.

Modified: trunk/BOOK/Makefile
===================================================================
--- trunk/BOOK/Makefile	2005-02-11 20:14:42 UTC (rev 163)
+++ trunk/BOOK/Makefile	2005-02-11 20:59:00 UTC (rev 164)
@@ -1,29 +1,55 @@
 BASEDIR=~/hlfs-book
 CHUNK_QUIET=0
-PDF_OUTPUT=HLFS-BOOK.pdf
-NOCHUNKS_OUTPUT=HLFS-BOOK.html
+PDF_OUTPUT=HLFS-BOOK-$(LIBC).pdf
+NOCHUNKS_OUTPUT=HLFS-BOOK-$(LIBC).html
 XSLROOTDIR=/usr/share/xml/docbook/xsl-stylesheets-current
+LIBC=glibc
 
 hlfs:
-	xsltproc --xinclude --nonet -stringparam profile.condition html \
-	-stringparam chunk.quietly $(CHUNK_QUIET)  -stringparam base.dir $(BASEDIR)/ \
+# top-level index.html
+	xsltproc --nonet --output $(BASEDIR)/index.html stylesheets/top-index.xsl prologue/bookinfo.xml
+
+# glibc
+	xsltproc --xinclude --nonet -stringparam profile.condition html,glibc \
+	-stringparam chunk.quietly $(CHUNK_QUIET)  -stringparam base.dir $(BASEDIR)/glibc/ \
 	stylesheets/lfs-chunked.xsl index.xml
 
-	if [ ! -e $(BASEDIR)/stylesheets ]; then \
-	  mkdir -p $(BASEDIR)/stylesheets; \
+	if [ ! -e $(BASEDIR)/glibc/stylesheets ]; then \
+	  mkdir -p $(BASEDIR)/glibc/stylesheets; \
 	fi;
-	cp stylesheets/*.css $(BASEDIR)/stylesheets
+	cp stylesheets/*.css $(BASEDIR)/glibc/stylesheets
 
-	if [ ! -e $(BASEDIR)/images ]; then \
-	  mkdir -p $(BASEDIR)/images; \
+	if [ ! -e $(BASEDIR)/glibc/images ]; then \
+	  mkdir -p $(BASEDIR)/glibc//images; \
 	fi;
 	cp $(XSLROOTDIR)/images/*.png \
-	  $(BASEDIR)/images
-	cd $(BASEDIR)/; sed -i -e "s at ../stylesheets at stylesheets@g" \
+	  $(BASEDIR)/glibc/images
+	cd $(BASEDIR)/glibc/; sed -i -e "s at ../stylesheets at stylesheets@g" \
 	  *.html
-	cd $(BASEDIR)/; sed -i -e "s at ../images at images@g" \
+	cd $(BASEDIR)/glibc/; sed -i -e "s at ../images at images@g" \
 	  *.html
 
+# uclibc
+	xsltproc --xinclude --nonet -stringparam profile.condition html,uclibc \
+	-stringparam chunk.quietly $(CHUNK_QUIET)  -stringparam base.dir $(BASEDIR)/uclibc/ \
+	stylesheets/lfs-chunked.xsl index.xml
+
+	if [ ! -e $(BASEDIR)/uclibc/stylesheets ]; then \
+	  mkdir -p $(BASEDIR)/uclibc/stylesheets; \
+	fi;
+	cp stylesheets/*.css $(BASEDIR)/uclibc/stylesheets
+
+	if [ ! -e $(BASEDIR)/uclibc/images ]; then \
+	  mkdir -p $(BASEDIR)/uclibc//images; \
+	fi;
+	cp $(XSLROOTDIR)/images/*.png \
+	  $(BASEDIR)/uclibc/images
+	cd $(BASEDIR)/uclibc/; sed -i -e "s at ../stylesheets at stylesheets@g" \
+	  *.html
+	cd $(BASEDIR)/uclibc/; sed -i -e "s at ../images at images@g" \
+	  *.html
+
+# common stuff
 	for filename in `find $(BASEDIR) -name "*.html"`; do \
 	  tidy -config tidy.conf $$filename; \
 	  true; \
@@ -34,7 +60,7 @@
 	done;
 
 pdf:
-	xsltproc --xinclude --nonet --stringparam profile.condition pdf \
+	xsltproc --xinclude --nonet --stringparam profile.condition pdf,$(LIBC) \
 		--output $(BASEDIR)/lfs-pdf.xml stylesheets/lfs-profile.xsl index.xml
 	xsltproc --nonet --output $(BASEDIR)/lfs-pdf.fo stylesheets/lfs-pdf.xsl \
 		$(BASEDIR)/lfs-pdf.xml
@@ -43,7 +69,7 @@
 	rm $(BASEDIR)/lfs-pdf.xml $(BASEDIR)/lfs-pdf.fo
 
 nochunks:
-	xsltproc --xinclude --nonet -stringparam profile.condition html \
+	xsltproc --xinclude --nonet -stringparam profile.condition html,$(LIBC) \
 	--output $(BASEDIR)/$(NOCHUNKS_OUTPUT) \
 	  stylesheets/lfs-nochunks.xsl index.xml
 

Modified: trunk/BOOK/stylesheets/lfs-chunked.xsl
===================================================================
--- trunk/BOOK/stylesheets/lfs-chunked.xsl	2005-02-11 20:14:42 UTC (rev 163)
+++ trunk/BOOK/stylesheets/lfs-chunked.xsl	2005-02-11 20:59:00 UTC (rev 164)
@@ -31,4 +31,7 @@
   <xsl:include href="xhtml/lfs-index.xsl"/>
   <xsl:include href="xhtml/lfs-navigational.xsl"/>
 
+    <!-- Changing the profiles separator character -->
+    <xsl:param name="profile.separator" select="','"/>
+
 </xsl:stylesheet>

Modified: trunk/BOOK/stylesheets/lfs-profile.xsl
===================================================================
--- trunk/BOOK/stylesheets/lfs-profile.xsl	2005-02-11 20:14:42 UTC (rev 163)
+++ trunk/BOOK/stylesheets/lfs-profile.xsl	2005-02-11 20:59:00 UTC (rev 164)
@@ -6,4 +6,7 @@
 
   <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.67.2/profiling/profile.xsl"/>
 
+    <!-- Changing the profiles separator character -->
+    <xsl:param name="profile.separator" select="','"/>
+
 </xsl:stylesheet>




More information about the hlfs-dev mailing list