source: Makefile@ 8eeb6bc

6.0
Last change on this file since 8eeb6bc was eb016f3b, checked in by Manuel Canales Esparcia <manuel@…>, 20 years ago

Readded the XML declaration in XHTML pages.
Added a sed command to change the Content-Type from text/html to application/xhtml+xml

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/testing/BOOK@4201 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 profile.condition html \
9 --output $(BASEDIR)/lfs-html.xml stylesheets/lfs-profile.xsl index.xml
10
11 xsltproc --nonet -stringparam chunk.quietly $(CHUNK_QUIET) \
12 -stringparam base.dir $(BASEDIR)/ stylesheets/lfs-chunked.xsl \
13 $(BASEDIR)/lfs-html.xml
14
15 if [ ! -e $(BASEDIR)/stylesheets ]; then \
16 mkdir -p $(BASEDIR)/stylesheets; \
17 fi;
18 cp stylesheets/*.css $(BASEDIR)/stylesheets
19
20 if [ ! -e $(BASEDIR)/images ]; then \
21 mkdir -p $(BASEDIR)/images; \
22 fi;
23 cp $(XSLROOTDIR)/images/*.png \
24 $(BASEDIR)/images
25 cd $(BASEDIR)/; sed -i -e "s@../stylesheets@stylesheets@g" \
26 *.html
27 cd $(BASEDIR)/; sed -i -e "s@../images@images@g" \
28 *.html
29
30 rm $(BASEDIR)/lfs-html.xml
31
32 sh goTidy $(BASEDIR)/
33
34 for filename in `find $(BASEDIR) -name "*.html"`; do \
35 sed -i -e "s@text/html@application/xhtml+xml@g" $$filename; \
36 done;
37
38#
39# This is the old "pdf" target. The old "print" target below has been
40# renamed to "pdf" and will be used. This commented out previous_pdf
41# target can be removed eventually. It'll remain here for a bit for
42# historical reasons
43#
44#previous_pdf:
45# xsltproc --xinclude --nonet --output $(BASEDIR)/lfs.fo stylesheets/lfs-pdf.xsl \
46# index.xml
47# sed -i -e "s/inherit/all/" $(BASEDIR)/lfs.fo
48# fop.sh $(BASEDIR)/lfs.fo $(BASEDIR)/$(PDF_OUTPUT)
49# rm lfs.fo
50
51pdf:
52 xsltproc --xinclude --nonet --stringparam profile.condition pdf \
53 --output $(BASEDIR)/lfs-pdf.xml stylesheets/lfs-profile.xsl index.xml
54 xsltproc --nonet --output $(BASEDIR)/lfs-pdf.fo stylesheets/lfs-pdf.xsl \
55 $(BASEDIR)/lfs-pdf.xml
56 sed -i -e "s/inherit/all/" $(BASEDIR)/lfs-pdf.fo
57 fop.sh $(BASEDIR)/lfs-pdf.fo $(BASEDIR)/$(PDF_OUTPUT)
58 rm $(BASEDIR)/lfs-pdf.xml $(BASEDIR)/lfs-pdf.fo
59
60nochunks:
61 xsltproc --xinclude --nonet --output $(BASEDIR)/$(NOCHUNKS_OUTPUT) \
62 stylesheets/lfs-nochunks.xsl index.xml
63 tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true
64
65validate:
66 xmllint --noout --nonet --xinclude --postvalid index.xml
67
Note: See TracBrowser for help on using the repository browser.