[44758be] | 1 | BASEDIR=~/lfs-book
|
---|
| 2 | CHUNK_QUIET=0
|
---|
| 3 | PDF_OUTPUT=LFS-BOOK.pdf
|
---|
| 4 | PRINT_OUTPUT=LFS-BOOK-PRINTABLE.pdf
|
---|
| 5 | NOCHUNKS_OUTPUT=LFS-BOOK.html
|
---|
| 6 | XSLROOTDIR=/usr/share/xml/docbook/xsl-stylesheets-current
|
---|
[287ea55] | 7 |
|
---|
| 8 | lfs:
|
---|
[44758be] | 9 | xsltproc --xinclude --nonet -stringparam chunk.quietly $(CHUNK_QUIET) \
|
---|
| 10 | -stringparam base.dir $(BASEDIR)/ stylesheets/lfs-chunked.xsl \
|
---|
| 11 | index.xml
|
---|
[287ea55] | 12 |
|
---|
[44758be] | 13 | if [ ! -e $(BASEDIR)/stylesheets ]; then \
|
---|
| 14 | mkdir -p $(BASEDIR)/stylesheets; \
|
---|
| 15 | fi;
|
---|
| 16 | cp stylesheets/*.css $(BASEDIR)/stylesheets
|
---|
| 17 |
|
---|
| 18 | if [ ! -e $(BASEDIR)/images ]; then \
|
---|
| 19 | mkdir -p $(BASEDIR)/images; \
|
---|
| 20 | fi;
|
---|
| 21 | cp $(XSLROOTDIR)/images/*.png \
|
---|
| 22 | $(BASEDIR)/images
|
---|
| 23 | cd $(BASEDIR)/; sed -i -e "s@../stylesheets@stylesheets@g" \
|
---|
[287ea55] | 24 | index.html part1.html part2.html part3.html longindex.html
|
---|
[44758be] | 25 | cd $(BASEDIR)/; sed -i -e "s@../images@images@g" \
|
---|
[287ea55] | 26 | index.html part1.html part2.html part3.html longindex.html
|
---|
| 27 |
|
---|
[44758be] | 28 | sh goTidy $(BASEDIR)/
|
---|
[91364a5] | 29 |
|
---|
[536b6aa] | 30 | #
|
---|
| 31 | # This is the old "pdf" target. The old "print" target below has been
|
---|
| 32 | # renamed to "pdf" and will be used. This commented out previous_pdf
|
---|
| 33 | # target can be removed eventually. It'll remain here for a bit for
|
---|
| 34 | # historical reasons
|
---|
| 35 | #
|
---|
| 36 | #previous_pdf:
|
---|
| 37 | # xsltproc --xinclude --nonet --output $(BASEDIR)/lfs.fo stylesheets/lfs-pdf.xsl \
|
---|
| 38 | # index.xml
|
---|
| 39 | # sed -i -e "s/inherit/all/" $(BASEDIR)/lfs.fo
|
---|
| 40 | # fop.sh $(BASEDIR)/lfs.fo $(BASEDIR)/$(PDF_OUTPUT)
|
---|
| 41 | # rm lfs.fo
|
---|
[287ea55] | 42 |
|
---|
[536b6aa] | 43 | pdf:
|
---|
| 44 | xsltproc --xinclude --nonet --stringparam profile.condition print \
|
---|
| 45 | --output $(BASEDIR)/lfs-print.xml stylesheets/lfs-profile.xsl index-print.xml
|
---|
| 46 | xsltproc --nonet --output $(BASEDIR)/lfs-print.fo stylesheets/lfs-print.xsl \
|
---|
| 47 | $(BASEDIR)/lfs-print.xml
|
---|
| 48 | sed -i -e "s/inherit/all/" $(BASEDIR)/lfs-print.fo
|
---|
| 49 | fop.sh $(BASEDIR)/lfs-print.fo $(BASEDIR)/$(PRINT_OUTPUT)
|
---|
| 50 | rm $(BASEDIR)/lfs-print.xml $(BASEDIR)/lfs-print.fo
|
---|
[91364a5] | 51 |
|
---|
| 52 | nochunks:
|
---|
[536b6aa] | 53 | xsltproc --xinclude --nonet --output $(BASEDIR)/$(NOCHUNKS_OUTPUT) \
|
---|
[91364a5] | 54 | stylesheets/lfs-nochunks.xsl index.xml
|
---|
[536b6aa] | 55 | tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true
|
---|
[91364a5] | 56 |
|
---|
[287ea55] | 57 | validate:
|
---|
| 58 | xmllint --noout --nonet --xinclude --postvalid index.xml
|
---|
[536b6aa] | 59 |
|
---|