source: Makefile@ ac89fab

Last change on this file since ac89fab was 9288c84, checked in by Manuel Canales Esparcia <manuel@…>, 20 years ago

One-step profiling for HTML output in multi-arch branch.

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

  • Property mode set to 100644
File size: 4.4 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
31# raq2
32 xsltproc --xinclude --nonet -stringparam profile.condition html -stringparam profile.arch raq2 \
[9288c84]33 -stringparam base.dir $(BASEDIR)/raq2/ stylesheets/lfs-chunked.xsl index.xml
[092d9ef]34
35 if [ ! -e $(BASEDIR)/raq2/stylesheets ]; then \
36 mkdir -p $(BASEDIR)/raq2/stylesheets; \
37 fi;
38 cp stylesheets/*.css $(BASEDIR)/raq2/stylesheets
39
40 if [ ! -e $(BASEDIR)/raq2/images ]; then \
41 mkdir -p $(BASEDIR)/raq2/images; \
42 fi;
43 cp $(XSLROOTDIR)/images/*.png \
44 $(BASEDIR)/raq2/images
45 cd $(BASEDIR)/raq2/; sed -i -e "s@../stylesheets@stylesheets@g" \
46 *.html
47 cd $(BASEDIR)/raq2/; sed -i -e "s@../images@images@g" \
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
69
[092d9ef]70# common stuff
71 for filename in `find $(BASEDIR) -name "*.html"`; do \
72 tidy -config tidy.conf $$filename; \
73 true; \
74 done;
75
76 for filename in `find $(BASEDIR) -name "*.html"`; do \
77 sed -i -e "s@text/html@application/xhtml+xml@g" $$filename; \
78 done;
79
80html:
[2b11d898]81 xsltproc --xinclude --nonet -stringparam profile.condition html -stringparam profile.arch $(ARCH) \
[9288c84]82 -stringparam base.dir $(BASEDIR)/ stylesheets/lfs-chunked.xsl index.xml
[094b6b4]83
84 if [ ! -e $(BASEDIR)/stylesheets ]; then \
85 mkdir -p $(BASEDIR)/stylesheets; \
86 fi;
87 cp stylesheets/*.css $(BASEDIR)/stylesheets
88
89 if [ ! -e $(BASEDIR)/images ]; then \
90 mkdir -p $(BASEDIR)/images; \
91 fi;
92 cp $(XSLROOTDIR)/images/*.png \
93 $(BASEDIR)/images
94 cd $(BASEDIR)/; sed -i -e "s@../stylesheets@stylesheets@g" \
[3001a42]95 *.html
[094b6b4]96 cd $(BASEDIR)/; sed -i -e "s@../images@images@g" \
[3001a42]97 *.html
[287ea55]98
[3a78860e]99 for filename in `find $(BASEDIR) -name "*.html"`; do \
[9d3e271]100 tidy -config tidy.conf $$filename; \
[3a78860e]101 true; \
102 done;
[094b6b4]103
[eb016f3b]104 for filename in `find $(BASEDIR) -name "*.html"`; do \
105 sed -i -e "s@text/html@application/xhtml+xml@g" $$filename; \
106 done;
107
[094b6b4]108#
109# This is the old "pdf" target. The old "print" target below has been
110# renamed to "pdf" and will be used. This commented out previous_pdf
111# target can be removed eventually. It'll remain here for a bit for
112# historical reasons
113#
114#previous_pdf:
115# xsltproc --xinclude --nonet --output $(BASEDIR)/lfs.fo stylesheets/lfs-pdf.xsl \
116# index.xml
117# sed -i -e "s/inherit/all/" $(BASEDIR)/lfs.fo
118# fop.sh $(BASEDIR)/lfs.fo $(BASEDIR)/$(PDF_OUTPUT)
119# rm lfs.fo
[287ea55]120
[3e46693]121pdf:
[51f501a]122 xsltproc --xinclude --nonet --stringparam profile.condition pdf -stringparam profile.arch $(ARCH) \
[9288c84]123 --output $(BASEDIR)/lfs-pdf.xml stylesheets/lfs-profile.xsl index.xml
124
[094b6b4]125 xsltproc --nonet --output $(BASEDIR)/lfs-pdf.fo stylesheets/lfs-pdf.xsl \
126 $(BASEDIR)/lfs-pdf.xml
[9288c84]127
[094b6b4]128 sed -i -e "s/inherit/all/" $(BASEDIR)/lfs-pdf.fo
[9288c84]129
[094b6b4]130 fop.sh $(BASEDIR)/lfs-pdf.fo $(BASEDIR)/$(PDF_OUTPUT)
[9288c84]131
[094b6b4]132 rm $(BASEDIR)/lfs-pdf.xml $(BASEDIR)/lfs-pdf.fo
[91364a5]133
134nochunks:
[51f501a]135 xsltproc --xinclude --nonet -stringparam profile.condition html -stringparam profile.arch $(ARCH) \
[9288c84]136 --output $(BASEDIR)/$(NOCHUNKS_OUTPUT) stylesheets/lfs-nochunks.xsl index.xml
[09a4b2f]137
[9d3e271]138 tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true
[91364a5]139
[09a4b2f]140 sed -i -e "s@text/html@application/xhtml+xml@g" \
141 $(BASEDIR)/$(NOCHUNKS_OUTPUT)
142
[287ea55]143validate:
144 xmllint --noout --nonet --xinclude --postvalid index.xml
[3e46693]145
Note: See TracBrowser for help on using the repository browser.