source: BOOK/Makefile@ 35d7e0a1

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 35d7e0a1 was a7dcec2, checked in by Jim Gifford <clfs@…>, 19 years ago

r2936@server (orig r1400): manuel | 2006-04-17 11:28:55 -0700
Changed Makefile to pull the images from the directory into was installed the actual DocBook-XSL version used in our cunstoms stylesheets.

  • Property mode set to 100644
File size: 3.8 KB
RevLine 
[3f8be484]1BASEDIR=~/cross-lfs-book
2DUMPDIR=~/cross-lfs-commands
3DLLISTDIR=~/cross-lfs-dllist
4CHUNK_QUIET=1
[a7dcec2]5XSLROOTDIR=/usr/share/xml/docbook/xsl-stylesheets-1.69.1
[8125418]6ARCH=x86 x86_64 x86_64-64 sparc sparc64 sparc64-64 mips mips64 mips64-64 ppc ppc64 alpha
[3f8be484]7
8# HTML Rendering Chunked
9define HTML_RENDER
10 echo "Rendering HTML of $$arch..." ; \
11 xsltproc --xinclude --nonet -stringparam profile.condition html \
12 -stringparam chunk.quietly $(CHUNK_QUIET) -stringparam base.dir $(BASEDIR)/$$arch/ \
13 $(PWD)/stylesheets/lfs-chunked.xsl $(PWD)/$$arch-index.xml ; \
14 mkdir -p $(BASEDIR)/$$arch/stylesheets ; \
15 cp $(PWD)/stylesheets/*.css $(BASEDIR)/$$arch/stylesheets ; \
16 cd $(BASEDIR)/$$arch/; sed -i -e "s@../stylesheets@stylesheets@g" *.html ; \
17 mkdir -p $(BASEDIR)/$$arch/images ; \
18 cp $(XSLROOTDIR)/images/*.png $(BASEDIR)/$$arch/images ; \
19 cd $(BASEDIR)/$$arch/; sed -i -e "s@../images@images@g" *.html
20endef
21
22# HTML Rendering No Chunks
23define HTML_RENDER2
24 echo "Rendering Single File HTML of $$arch..." ; \
25 xsltproc --xinclude --nonet -stringparam profile.condition html \
[2965d0d]26 --output $(BASEDIR)/CLFS-BOOK-$$arch.html \
[3f8be484]27 $(PWD)/stylesheets/lfs-nochunks.xsl $$arch-index.xml
28endef
29
30# PDF Rendering
31define PDF_RENDER
32 echo "Rendering PDF of $$arch..." ; \
33 xsltproc --xinclude --nonet --output $(BASEDIR)/lfs-pdf.fo \
34 $(PWD)/stylesheets/lfs-pdf.xsl $$arch-index.xml ; \
35 sed -i -e "s/inherit/all/" $(BASEDIR)/lfs-pdf.fo ; \
[2965d0d]36 fop.sh -q $(BASEDIR)/lfs-pdf.fo -pdf $(BASEDIR)/CLFS-BOOK-$$arch.pdf ; \
[3f8be484]37 rm $(BASEDIR)/lfs-pdf.fo
38endef
39
40# Plain Text Rendering
41define TEXT_RENDER
42 echo "Rendering Text of $$arch..." ; \
43 xsltproc --xinclude --nonet --output $(BASEDIR)/lfs-pdf.fo \
44 $(PWD)/stylesheets/lfs-pdf.xsl $$arch-index.xml ; \
45 sed -i -e "s/inherit/all/" $(BASEDIR)/lfs-pdf.fo ; \
[2965d0d]46 fop.sh $(BASEDIR)/lfs-pdf.fo -txt $(BASEDIR)/CLFS-BOOK-$$arch.txt ; \
[3f8be484]47 rm $(BASEDIR)/lfs-pdf.fo
48endef
49
50# Validation
51define VALIDATE
52 echo "Validating $$arch..." ; \
53 xmllint --xinclude --noout --nonet --postvalid $(PWD)/$$arch-index.xml
54endef
55
[a3476c5]56# TroubleShoot
57define TROUBLE
58 echo "Troubleshooting $$arch..." ; \
59 xmllint --xinclude --nonet --postvalid $(PWD)/$$arch-index.xml > /tmp/dump-$$arch ; \
[134ba96]60 xmllint --xinclude --noout --nonet --valid /tmp/dump-$$arch ; \
[a3476c5]61 echo "You can now look at /tmp/dump-$$arch to see the errors"
62endef
63
[3f8be484]64# Dump commands
65define DUMP
66 echo "Extracting commands from $$arch..." ; \
67 xsltproc --xinclude --nonet --output $(DUMPDIR)/$$arch/ \
68 $(PWD)/stylesheets/dump-commands.xsl $$arch-index.xml
69endef
70
71# Get commands
72define DLLIST
73 echo "Creating download list for $$arch..." ; \
74 xsltproc --xinclude --nonet --output $(DLLISTDIR)/$$arch.dl.list \
75 $(PWD)/stylesheets/wget.xsl $$arch-index.xml
76endef
77
78lfs: toplevel render common
79
80toplevel:
81 @xsltproc --nonet --output $(BASEDIR)/index.html $(PWD)/stylesheets/top-index.xsl $(PWD)/index.xml
82
83render:
84 @for arch in $(ARCH) ; do \
85 $(HTML_RENDER) ; \
86 done
87
88common:
89 @for filename in `find $(BASEDIR) -name "*.html"`; do \
90 tidy -config tidy.conf $$filename; \
91 true; \
92 sh obfuscate.sh $$filename; \
93 sed -i -e "s@text/html@application/xhtml+xml@g" $$filename; \
94 done;
95
96nochunks: nochunk_render common
97
98nochunk_render:
99
100 @for arch in $(ARCH) ; do \
101 $(HTML_RENDER2) ; \
102 done
103
104pdf:
105 @for arch in $(ARCH) ; do \
106 $(PDF_RENDER) ; \
107 done
108
109text:
110 @for arch in $(ARCH) ; do \
111 $(TEXT_RENDER) ; \
112 done
113
114validate:
115 @for arch in $(ARCH) ; do \
116 $(VALIDATE) ; \
117 done
118
[a3476c5]119trouble:
120 @for arch in $(ARCH) ; do \
121 $(TROUBLE) ; \
122 done
123
[3f8be484]124dump-commands:
125 @for arch in $(ARCH) ; do \
126 $(DUMP) ; \
127 done
128
129download-list:
130 @for arch in $(ARCH) ; do \
131 $(DLLIST) ; \
132 done
133
[a3476c5]134.PHONY: lfs toplevel common render nochunk nochunk_render pdf text validate trouble dump-commands download-list
Note: See TracBrowser for help on using the repository browser.