source: Makefile@ 29f044c

Last change on this file since 29f044c was 51f501a, checked in by Manuel Canales Esparcia <manuel@…>, 20 years ago

Added arch profile support for PDF and nochunk output.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multi-arch/BOOK@4413 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 2.6 KB
RevLine 
[51f501a]1BASEDIR=~/lfs-book-raq2
[094b6b4]2CHUNK_QUIET=0
[51f501a]3PDF_OUTPUT=LFS-BOOK-RaQ2.pdf
4NOCHUNKS_OUTPUT=LFS-BOOK-RaQ2.html
[094b6b4]5XSLROOTDIR=/usr/share/xml/docbook/xsl-stylesheets-current
[2b11d898]6ARCH=raq2
[287ea55]7
8lfs:
[2b11d898]9 xsltproc --xinclude --nonet -stringparam profile.condition html -stringparam profile.arch $(ARCH) \
[868b5fc]10 --output $(BASEDIR)/lfs-html.xml stylesheets/lfs-profile.xsl index.xml
11
12 xsltproc --nonet -stringparam chunk.quietly $(CHUNK_QUIET) \
[094b6b4]13 -stringparam base.dir $(BASEDIR)/ stylesheets/lfs-chunked.xsl \
[868b5fc]14 $(BASEDIR)/lfs-html.xml
[094b6b4]15
16 if [ ! -e $(BASEDIR)/stylesheets ]; then \
17 mkdir -p $(BASEDIR)/stylesheets; \
18 fi;
19 cp stylesheets/*.css $(BASEDIR)/stylesheets
20
21 if [ ! -e $(BASEDIR)/images ]; then \
22 mkdir -p $(BASEDIR)/images; \
23 fi;
24 cp $(XSLROOTDIR)/images/*.png \
25 $(BASEDIR)/images
26 cd $(BASEDIR)/; sed -i -e "s@../stylesheets@stylesheets@g" \
[3001a42]27 *.html
[094b6b4]28 cd $(BASEDIR)/; sed -i -e "s@../images@images@g" \
[3001a42]29 *.html
[287ea55]30
[868b5fc]31 rm $(BASEDIR)/lfs-html.xml
32
[3a78860e]33 for filename in `find $(BASEDIR) -name "*.html"`; do \
[9d3e271]34 tidy -config tidy.conf $$filename; \
[3a78860e]35 true; \
36 done;
[094b6b4]37
[eb016f3b]38 for filename in `find $(BASEDIR) -name "*.html"`; do \
39 sed -i -e "s@text/html@application/xhtml+xml@g" $$filename; \
40 done;
41
[094b6b4]42#
43# This is the old "pdf" target. The old "print" target below has been
44# renamed to "pdf" and will be used. This commented out previous_pdf
45# target can be removed eventually. It'll remain here for a bit for
46# historical reasons
47#
48#previous_pdf:
49# xsltproc --xinclude --nonet --output $(BASEDIR)/lfs.fo stylesheets/lfs-pdf.xsl \
50# index.xml
51# sed -i -e "s/inherit/all/" $(BASEDIR)/lfs.fo
52# fop.sh $(BASEDIR)/lfs.fo $(BASEDIR)/$(PDF_OUTPUT)
53# rm lfs.fo
[287ea55]54
[3e46693]55pdf:
[51f501a]56 xsltproc --xinclude --nonet --stringparam profile.condition pdf -stringparam profile.arch $(ARCH) \
[094b6b4]57 --output $(BASEDIR)/lfs-pdf.xml stylesheets/lfs-profile.xsl index.xml
58 xsltproc --nonet --output $(BASEDIR)/lfs-pdf.fo stylesheets/lfs-pdf.xsl \
59 $(BASEDIR)/lfs-pdf.xml
60 sed -i -e "s/inherit/all/" $(BASEDIR)/lfs-pdf.fo
61 fop.sh $(BASEDIR)/lfs-pdf.fo $(BASEDIR)/$(PDF_OUTPUT)
62 rm $(BASEDIR)/lfs-pdf.xml $(BASEDIR)/lfs-pdf.fo
[91364a5]63
64nochunks:
[51f501a]65 xsltproc --xinclude --nonet -stringparam profile.condition html -stringparam profile.arch $(ARCH) \
[09a4b2f]66 --output $(BASEDIR)/lfs-nochunk.xml stylesheets/lfs-profile.xsl index.xml
67
68 xsltproc --nonet --output $(BASEDIR)/$(NOCHUNKS_OUTPUT) \
69 stylesheets/lfs-nochunks.xsl $(BASEDIR)/lfs-nochunk.xml
70
71 rm $(BASEDIR)/lfs-nochunk.xml
72
[9d3e271]73 tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true
[91364a5]74
[09a4b2f]75 sed -i -e "s@text/html@application/xhtml+xml@g" \
76 $(BASEDIR)/$(NOCHUNKS_OUTPUT)
77
[287ea55]78validate:
79 xmllint --noout --nonet --xinclude --postvalid index.xml
[3e46693]80
Note: See TracBrowser for help on using the repository browser.