source: Makefile@ 6a0e6f3

Last change on this file since 6a0e6f3 was a8f36125, checked in by Matthew Burgess <matthew@…>, 20 years ago
  • (all) Removed all references to the DocBook DTD
  • (docbook.rng) Added the DocBook "Gin" schema
  • (Makefile) Updated with new validation command
  • (prologue/*) Validation fixes

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

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