source: Makefile@ ec5839b

Last change on this file since ec5839b was 09a4b2f, checked in by Manuel Canales Esparcia <manuel@…>, 20 years ago

Updated the nochunk stylesheet.

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

  • Property mode set to 100644
File size: 2.5 KB
RevLine 
[094b6b4]1BASEDIR=~/lfs-book
2CHUNK_QUIET=0
3PDF_OUTPUT=LFS-BOOK.pdf
4NOCHUNKS_OUTPUT=LFS-BOOK.html
5XSLROOTDIR=/usr/share/xml/docbook/xsl-stylesheets-current
[3a78860e]6TIDY=/home/manuel/bin/lfs-tidy
[287ea55]7
8lfs:
[868b5fc]9 xsltproc --xinclude --nonet -stringparam profile.condition html \
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 \
34 $(TIDY) -config tidy.conf $$filename; \
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:
[868b5fc]56 xsltproc --xinclude --nonet --stringparam profile.condition pdf \
[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:
[09a4b2f]65 xsltproc --xinclude --nonet -stringparam profile.condition html \
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
[3a78860e]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.