source: Makefile@ 1684855

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

Fixed the multi-arch Makefile.

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

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