Update to systemd-231
[linux_from_scratch.git] / editor-manual / Makefile
blob694fd37b655b73f253dd37f7564e9c17e2f7de68
1 BASEDIR=~/lfs-editors-guide
2 CHUNK_QUIET=1
3 PDF_OUTPUT=LFS-EDITORS-GUIDE.pdf
4 NOCHUNKS_OUTPUT=LFS-EDITORS-GUIDE.html
5 XSLROOTDIR=/usr/share/xml/docbook/xsl-stylesheets-current
7 lfs:
8 xsltproc --xinclude --nonet -stringparam chunk.quietly $(CHUNK_QUIET) \
9 -stringparam base.dir $(BASEDIR)/ ../BOOK/stylesheets/lfs-chunked.xsl index.xml
11 if [ ! -e $(BASEDIR)/stylesheets ]; then \
12 mkdir -p $(BASEDIR)/stylesheets; \
13 fi;
14 cp stylesheets/*.css $(BASEDIR)/stylesheets
16 if [ ! -e $(BASEDIR)/images ]; then \
17 mkdir -p $(BASEDIR)/images; \
18 fi;
19 cp $(XSLROOTDIR)/images/*.png \
20 $(BASEDIR)/images
21 cd $(BASEDIR)/; sed -i -e "s@../stylesheets@stylesheets@g" \
22 *.html
23 cd $(BASEDIR)/; sed -i -e "s@../images@images@g" \
24 *.html
26 for filename in `find $(BASEDIR) -name "*.html"`; do \
27 tidy -config tidy.conf $$filename; \
28 true; \
29 done;
31 for filename in `find $(BASEDIR) -name "*.html"`; do \
32 sed -i -e "s@text/html@application/xhtml+xml@g" $$filename; \
33 done;
35 pdf:
36 xsltproc --xinclude --nonet --output $(BASEDIR)/lfs-pdf.fo \
37 stylesheets/lfs-pdf.xsl index.xml
38 sed -i -e "s/inherit/all/" $(BASEDIR)/lfs-pdf.fo
39 fop.sh $(BASEDIR)/lfs-pdf.fo $(BASEDIR)/$(PDF_OUTPUT)
40 rm $(BASEDIR)/lfs-pdf.fo
42 nochunks:
43 xsltproc --xinclude --nonet -stringparam profile.condition html \
44 --output $(BASEDIR)/$(NOCHUNKS_OUTPUT) \
45 stylesheets/lfs-nochunks.xsl index.xml
47 tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true
49 sed -i -e "s@text/html@application/xhtml+xml@g" \
50 $(BASEDIR)/$(NOCHUNKS_OUTPUT)
52 validate:
53 xmllint --noout --nonet --xinclude --postvalid index.xml