source: Makefile@ 51f501a

Last change on this file since 51f501a 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
Line 
1BASEDIR=~/lfs-book-raq2
2CHUNK_QUIET=0
3PDF_OUTPUT=LFS-BOOK-RaQ2.pdf
4NOCHUNKS_OUTPUT=LFS-BOOK-RaQ2.html
5XSLROOTDIR=/usr/share/xml/docbook/xsl-stylesheets-current
6ARCH=raq2
7
8lfs:
9 xsltproc --xinclude --nonet -stringparam profile.condition html -stringparam profile.arch $(ARCH) \
10 --output $(BASEDIR)/lfs-html.xml stylesheets/lfs-profile.xsl index.xml
11
12 xsltproc --nonet -stringparam chunk.quietly $(CHUNK_QUIET) \
13 -stringparam base.dir $(BASEDIR)/ stylesheets/lfs-chunked.xsl \
14 $(BASEDIR)/lfs-html.xml
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" \
27 *.html
28 cd $(BASEDIR)/; sed -i -e "s@../images@images@g" \
29 *.html
30
31 rm $(BASEDIR)/lfs-html.xml
32
33 for filename in `find $(BASEDIR) -name "*.html"`; do \
34 tidy -config tidy.conf $$filename; \
35 true; \
36 done;
37
38 for filename in `find $(BASEDIR) -name "*.html"`; do \
39 sed -i -e "s@text/html@application/xhtml+xml@g" $$filename; \
40 done;
41
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
54
55pdf:
56 xsltproc --xinclude --nonet --stringparam profile.condition pdf -stringparam profile.arch $(ARCH) \
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
63
64nochunks:
65 xsltproc --xinclude --nonet -stringparam profile.condition html -stringparam profile.arch $(ARCH) \
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
73 tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true
74
75 sed -i -e "s@text/html@application/xhtml+xml@g" \
76 $(BASEDIR)/$(NOCHUNKS_OUTPUT)
77
78validate:
79 xmllint --noout --nonet --xinclude --postvalid index.xml
80
Note: See TracBrowser for help on using the repository browser.