r5304 - branches/cross-lfs/BOOK

jim at linuxfromscratch.org jim at linuxfromscratch.org
Thu May 12 11:41:47 PDT 2005


Author: jim
Date: 2005-05-12 12:41:39 -0600 (Thu, 12 May 2005)
New Revision: 5304

Modified:
   branches/cross-lfs/BOOK/Makefile
Log:
Modified Makefile : It will now generate single file html
and pdf.



Modified: branches/cross-lfs/BOOK/Makefile
===================================================================
--- branches/cross-lfs/BOOK/Makefile	2005-05-12 04:40:51 UTC (rev 5303)
+++ branches/cross-lfs/BOOK/Makefile	2005-05-12 18:41:39 UTC (rev 5304)
@@ -1,16 +1,16 @@
 BASEDIR=~/lfs-book
-CHUNK_QUIET=0
+CHUNK_QUIET=1
 PDF_OUTPUT=LFS-BOOK-$(ARCH).pdf
 NOCHUNKS_OUTPUT=LFS-BOOK-$(ARCH).html
 XSLROOTDIR=/usr/share/xml/docbook/xsl-stylesheets-current
 ARCH=x86 sparc sparc64 raq2 ppc
 
-# HTML Rendering
+# HTML Rendering Chunked
 define HTML_RENDER
-	echo "Rendering $$arch..." ; \
+	echo "Rendering HTML of $$arch..." ; \
 	xsltproc --xinclude --nonet -stringparam profile.condition html \
 	  -stringparam chunk.quietly $(CHUNK_QUIET) -stringparam base.dir $(BASEDIR)/$$arch/ \
-		$(PWD)/stylesheets/lfs-chunked.xsl $(PWD)/$$arch-index.xml ; \
+	  $(PWD)/stylesheets/lfs-chunked.xsl $(PWD)/$$arch-index.xml ; \
 	mkdir -p $(BASEDIR)/$$arch/stylesheets ; \
 	cp $(PWD)/stylesheets/*.css $(BASEDIR)/$$arch/stylesheets ; \
 	cd $(BASEDIR)/$$arch/; sed -i -e "s at ../stylesheets at stylesheets@g" *.html ; \
@@ -19,6 +19,24 @@
 	cd $(BASEDIR)/$$arch/; sed -i -e "s at ../images at images@g" *.html
 endef
 
+# PDF Rendering
+define PDF_RENDER
+	echo "Rendering PDF of $$arch..." ; \
+        xsltproc --xinclude --nonet --output $(BASEDIR)/lfs-pdf.fo \
+                $(PWD)/stylesheets/lfs-pdf.xsl $$arch-index.xml ; \
+        sed -i -e "s/inherit/all/" $(BASEDIR)/lfs-pdf.fo ; \
+        fop.sh $(BASEDIR)/lfs-pdf.fo $(BASEDIR)/LFS-BOOK-$$arch.pdf ; \
+        rm $(BASEDIR)/lfs-pdf.fo
+endef
+
+# HTML Rendering No Chunks
+define HTML_RENDER2
+	echo "Rendering Single File HTML of $$arch..." ; \
+	xsltproc --xinclude --nonet -stringparam profile.condition html \
+	   --output $(BASEDIR)/LFS-BOOK-$$arch.html \
+	   $(PWD)/stylesheets/lfs-nochunks.xsl $$arch-index.xml
+endef
+
 # Validation
 define VALIDATE
         echo "Validating $$arch..." ; \
@@ -38,15 +56,28 @@
 	done 
 
 common:
-	for filename in `find $(BASEDIR) -name "*.html"`; do \
+	@for filename in `find $(BASEDIR) -name "*.html"`; do \
+	  echo "Tidying $$filename.."; \
 	  tidy -config tidy.conf $$filename; \
 	  true; \
 	done;
-
-	for filename in `find $(BASEDIR) -name "*.html"`; do \
+	@for filename in `find $(BASEDIR) -name "*.html"`; do \
 	  sed -i -e "s at text/html at application/xhtml+xml at g" $$filename; \
 	done;
 
+nochunk: nochunk_render common
+
+nochunk_render:
+
+	@for arch in $(ARCH) ; do \
+	$(HTML_RENDER2) ; \
+	done
+
+pdf:
+	@for arch in $(ARCH) ; do \
+	$(PDF_RENDER) ; \
+	done
+
 validate: validation cleanup
 
 validation:
@@ -60,4 +91,4 @@
 	rm -f $(PWD)/index-$$arch.xml ; \
 	done
 
-.PHONY: lfs toplevel x86 sparc sparc64 ppc html pdf nochunks validate
+.PHONY: lfs toplevel pdf nochunks validate validation cleanup




More information about the lfs-book mailing list