source: Makefile@ e7a605c

Last change on this file since e7a605c was 8ac05079, checked in by Manuel Canales Esparcia <manuel@…>, 19 years ago

Fixed the Makefile.

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

  • Property mode set to 100644
File size: 5.8 KB
RevLine 
[092d9ef]1BASEDIR=~/lfs-book
[094b6b4]2CHUNK_QUIET=0
[092d9ef]3PDF_OUTPUT=LFS-BOOK.pdf
4NOCHUNKS_OUTPUT=LFS-BOOK.html
[094b6b4]5XSLROOTDIR=/usr/share/xml/docbook/xsl-stylesheets-current
[092d9ef]6ARCH=x86
[287ea55]7
8lfs:
[092d9ef]9# top-level index.html
10 xsltproc --nonet --output $(BASEDIR)/index.html stylesheets/top-index.xsl prologue/bookinfo.xml
11
12# x86
13 xsltproc --xinclude --nonet -stringparam profile.condition html -stringparam profile.arch x86 \
[9288c84]14 -stringparam base.dir $(BASEDIR)/x86/ stylesheets/lfs-chunked.xsl index.xml
[092d9ef]15
16 if [ ! -e $(BASEDIR)/x86/stylesheets ]; then \
17 mkdir -p $(BASEDIR)/x86/stylesheets; \
18 fi;
19 cp stylesheets/*.css $(BASEDIR)/x86/stylesheets
20
21 if [ ! -e $(BASEDIR)/x86/images ]; then \
22 mkdir -p $(BASEDIR)/x86/images; \
23 fi;
24 cp $(XSLROOTDIR)/images/*.png \
25 $(BASEDIR)/x86/images
26 cd $(BASEDIR)/x86/; sed -i -e "s@../stylesheets@stylesheets@g" \
27 *.html
28 cd $(BASEDIR)/x86/; sed -i -e "s@../images@images@g" \
29 *.html
30
[dd13e76]31# alpha
32 xsltproc --xinclude --nonet -stringparam profile.condition html -stringparam profile.arch alpha \
33 -stringparam base.dir $(BASEDIR)/alpha/ stylesheets/lfs-chunked.xsl index.xml
[092d9ef]34
[dd13e76]35 if [ ! -e $(BASEDIR)/alpha/stylesheets ]; then \
36 mkdir -p $(BASEDIR)/alpha/stylesheets; \
[092d9ef]37 fi;
[dd13e76]38 cp stylesheets/*.css $(BASEDIR)/alpha/stylesheets
[092d9ef]39
[dd13e76]40 if [ ! -e $(BASEDIR)/alpha/images ]; then \
41 mkdir -p $(BASEDIR)/alpha/images; \
[092d9ef]42 fi;
43 cp $(XSLROOTDIR)/images/*.png \
[dd13e76]44 $(BASEDIR)/alpha/images
45 cd $(BASEDIR)/alpha/; sed -i -e "s@../stylesheets@stylesheets@g" \
[092d9ef]46 *.html
[dd13e76]47 cd $(BASEDIR)/alpha/; sed -i -e "s@../images@images@g" \
[092d9ef]48 *.html
49
[da51ba8]50# ppc
51 xsltproc --xinclude --nonet -stringparam profile.condition html -stringparam profile.arch ppc \
[9288c84]52 -stringparam base.dir $(BASEDIR)/ppc/ stylesheets/lfs-chunked.xsl index.xml
[da51ba8]53
54 if [ ! -e $(BASEDIR)/ppc/stylesheets ]; then \
55 mkdir -p $(BASEDIR)/ppc/stylesheets; \
56 fi;
57 cp stylesheets/*.css $(BASEDIR)/ppc/stylesheets
58
59 if [ ! -e $(BASEDIR)/ppc/images ]; then \
60 mkdir -p $(BASEDIR)/ppc/images; \
61 fi;
62 cp $(XSLROOTDIR)/images/*.png \
63 $(BASEDIR)/ppc/images
64 cd $(BASEDIR)/ppc/; sed -i -e "s@../stylesheets@stylesheets@g" \
65 *.html
66 cd $(BASEDIR)/ppc/; sed -i -e "s@../images@images@g" \
67 *.html
68
[dd13e76]69# raq2
70 xsltproc --xinclude --nonet -stringparam profile.condition html -stringparam profile.arch raq2 \
71 -stringparam base.dir $(BASEDIR)/raq2/ stylesheets/lfs-chunked.xsl index.xml
72
73 if [ ! -e $(BASEDIR)/raq2/stylesheets ]; then \
74 mkdir -p $(BASEDIR)/raq2/stylesheets; \
75 fi;
76 cp stylesheets/*.css $(BASEDIR)/raq2/stylesheets
77
78 if [ ! -e $(BASEDIR)/raq2/images ]; then \
79 mkdir -p $(BASEDIR)/raq2/images; \
80 fi;
81 cp $(XSLROOTDIR)/images/*.png \
82 $(BASEDIR)/raq2/images
83 cd $(BASEDIR)/raq2/; sed -i -e "s@../stylesheets@stylesheets@g" \
84 *.html
85 cd $(BASEDIR)/raq2/; sed -i -e "s@../images@images@g" \
86 *.html
[da51ba8]87
[092d9ef]88# common stuff
89 for filename in `find $(BASEDIR) -name "*.html"`; do \
90 tidy -config tidy.conf $$filename; \
91 true; \
92 done;
93
94 for filename in `find $(BASEDIR) -name "*.html"`; do \
95 sed -i -e "s@text/html@application/xhtml+xml@g" $$filename; \
96 done;
97
98html:
[2b11d898]99 xsltproc --xinclude --nonet -stringparam profile.condition html -stringparam profile.arch $(ARCH) \
[9288c84]100 -stringparam base.dir $(BASEDIR)/ stylesheets/lfs-chunked.xsl index.xml
[094b6b4]101
102 if [ ! -e $(BASEDIR)/stylesheets ]; then \
103 mkdir -p $(BASEDIR)/stylesheets; \
104 fi;
105 cp stylesheets/*.css $(BASEDIR)/stylesheets
106
107 if [ ! -e $(BASEDIR)/images ]; then \
108 mkdir -p $(BASEDIR)/images; \
109 fi;
110 cp $(XSLROOTDIR)/images/*.png \
111 $(BASEDIR)/images
112 cd $(BASEDIR)/; sed -i -e "s@../stylesheets@stylesheets@g" \
[3001a42]113 *.html
[094b6b4]114 cd $(BASEDIR)/; sed -i -e "s@../images@images@g" \
[3001a42]115 *.html
[287ea55]116
[3a78860e]117 for filename in `find $(BASEDIR) -name "*.html"`; do \
[9d3e271]118 tidy -config tidy.conf $$filename; \
[3a78860e]119 true; \
120 done;
[094b6b4]121
[eb016f3b]122 for filename in `find $(BASEDIR) -name "*.html"`; do \
123 sed -i -e "s@text/html@application/xhtml+xml@g" $$filename; \
124 done;
125
[094b6b4]126#
127# This is the old "pdf" target. The old "print" target below has been
128# renamed to "pdf" and will be used. This commented out previous_pdf
129# target can be removed eventually. It'll remain here for a bit for
130# historical reasons
131#
132#previous_pdf:
133# xsltproc --xinclude --nonet --output $(BASEDIR)/lfs.fo stylesheets/lfs-pdf.xsl \
134# index.xml
135# sed -i -e "s/inherit/all/" $(BASEDIR)/lfs.fo
136# fop.sh $(BASEDIR)/lfs.fo $(BASEDIR)/$(PDF_OUTPUT)
137# rm lfs.fo
[287ea55]138
[3e46693]139pdf:
[51f501a]140 xsltproc --xinclude --nonet --stringparam profile.condition pdf -stringparam profile.arch $(ARCH) \
[9288c84]141 --output $(BASEDIR)/lfs-pdf.xml stylesheets/lfs-profile.xsl index.xml
142
[094b6b4]143 xsltproc --nonet --output $(BASEDIR)/lfs-pdf.fo stylesheets/lfs-pdf.xsl \
144 $(BASEDIR)/lfs-pdf.xml
[9288c84]145
[094b6b4]146 sed -i -e "s/inherit/all/" $(BASEDIR)/lfs-pdf.fo
[9288c84]147
[094b6b4]148 fop.sh $(BASEDIR)/lfs-pdf.fo $(BASEDIR)/$(PDF_OUTPUT)
[9288c84]149
[094b6b4]150 rm $(BASEDIR)/lfs-pdf.xml $(BASEDIR)/lfs-pdf.fo
[91364a5]151
152nochunks:
[51f501a]153 xsltproc --xinclude --nonet -stringparam profile.condition html -stringparam profile.arch $(ARCH) \
[9288c84]154 --output $(BASEDIR)/$(NOCHUNKS_OUTPUT) stylesheets/lfs-nochunks.xsl index.xml
[09a4b2f]155
[9d3e271]156 tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true
[91364a5]157
[09a4b2f]158 sed -i -e "s@text/html@application/xhtml+xml@g" \
159 $(BASEDIR)/$(NOCHUNKS_OUTPUT)
160
[287ea55]161validate:
[bcadcfe]162# x86
[8ac05079]163 xsltproc --xinclude --nonet -stringparam profile.arch x86 \
[bcadcfe]164 --output index-x86.xml stylesheets/lfs-profile.xsl index.xml
165 xmllint --noout --nonet --postvalid index-x86.xml
166
167# alpha
[8ac05079]168 xsltproc --xinclude --nonet -stringparam profile.arch alpha \
[bcadcfe]169 --output index-alpha.xml stylesheets/lfs-profile.xsl index.xml
170 xmllint --noout --nonet --postvalid index-alpha.xml
171
172# ppc
[8ac05079]173 xsltproc --xinclude --nonet -stringparam profile.arch ppc \
[bcadcfe]174 --output index-ppc.xml stylesheets/lfs-profile.xsl index.xml
175 xmllint --noout --nonet --postvalid index-ppc.xml
176
177# raq2
[8ac05079]178 xsltproc --xinclude --nonet -stringparam profile.arch raq2 \
[bcadcfe]179 --output index-raq2.xml stylesheets/lfs-profile.xsl index.xml
180 xmllint --noout --nonet --postvalid index-raq2.xml
181
182# clean-up
183 rm index-x86.xml index-alpha.xml index-ppc.xml index-raq2.xml
[3e46693]184
Note: See TracBrowser for help on using the repository browser.