source: Makefile@ 77ab7f3

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 77ab7f3 was 77ab7f3, checked in by Bruce Dubbs <bdubbs@…>, 8 years ago

Update Makefile for merged files" nochunks, md5sums, wget-list
Fix some formatting ant typos

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/merge@11074 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 11.3 KB
Line 
1BASEDIR = ~/lfs-book
2SYSDDIR = ~/lfs-systemd
3DUMPDIR = ~/lfs-commands
4RENDERTMP = $(HOME)/tmp
5CHUNK_QUIET = 1
6ROOT_ID =
7PDF_OUTPUT = LFS-BOOK.pdf
8NOCHUNKS_OUTPUT = LFS-BOOK.html
9NOCHUNKS_SYSD_FILE = LFS-SYSD-BOOK.html
10SHELL = /bin/bash
11
12ifdef V
13 Q =
14else
15 Q = @
16endif
17
18sysv: validate profile-html
19 $(Q)xsltproc --nonet \
20 --output $(RENDERTMP)/lfs-html2.xml \
21 --stringparam profile.revision sysv \
22 stylesheets/lfs-xsl/profile.xsl \
23 $(RENDERTMP)/lfs-html.xml
24
25 @echo "Generating chunked XHTML files..."
26 $(Q)xsltproc --nonet \
27 --stringparam chunk.quietly $(CHUNK_QUIET) \
28 --stringparam rootid "$(ROOT_ID)" \
29 --stringparam base.dir $(BASEDIR)/ \
30 stylesheets/lfs-chunked.xsl \
31 $(RENDERTMP)/lfs-html2.xml
32
33 @echo "Copying CSS code and images..."
34 $(Q)mkdir -p $(BASEDIR)/stylesheets
35 $(Q)cp stylesheets/lfs-xsl/*.css $(BASEDIR)/stylesheets
36 $(Q)pushd $(BASEDIR)/ > /dev/null; \
37 sed -i -e "s@../stylesheets@stylesheets@g" *.html; \
38 popd > /dev/null
39
40 $(Q)mkdir -p $(BASEDIR)/images
41 $(Q)cp images/*.png $(BASEDIR)/images
42
43 @echo "Running Tidy and obfuscate.sh..."
44 $(Q)for filename in `find $(BASEDIR) -name "*.html"`; do \
45 tidy -config tidy.conf $$filename; \
46 true; \
47 /bin/bash obfuscate.sh $$filename; \
48 sed -e "s@text/html@application/xhtml+xml@g" \
49 -e "s/\xa9/\&copy;/ " \
50 -i $$filename; \
51 done;
52
53 $(Q)$(MAKE) --no-print-directory wget-list md5sums
54
55systemd: validated profile-html
56 $(Q)xsltproc --nonet \
57 --output $(RENDERTMP)/lfs-html2.xml \
58 --stringparam profile.revision systemd \
59 stylesheets/lfs-xsl/profile.xsl \
60 $(RENDERTMP)/lfs-html.xml
61
62 @echo "Generating chunked XHTML files..."
63 $(Q)xsltproc --nonet \
64 --stringparam chunk.quietly $(CHUNK_QUIET) \
65 --stringparam rootid "$(ROOT_ID)" \
66 --stringparam base.dir $(SYSDDIR)/ \
67 stylesheets/lfs-chunked.xsl \
68 $(RENDERTMP)/lfs-html2.xml
69
70 @echo "Copying CSS code and images..."
71 $(Q)mkdir -p $(SYSDDIR)/stylesheets
72 $(Q)cp stylesheets/lfs-xsl/*.css $(SYSDDIR)/stylesheets
73
74 $(Q)mkdir -p $(SYSDDIR)/images
75 $(Q)cp images/*.png $(SYSDDIR)/images
76
77 @echo "Running Tidy and obfuscate.sh..."
78 $(Q)for filename in `find $(SYSDDIR) -name "*.html"`; do \
79 tidy -config tidy.conf $$filename; \
80 true; \
81 /bin/bash obfuscate.sh $$filename; \
82 sed -e "s@text/html@application/xhtml+xml@g" \
83 -e "s/\xa9/\&copy;/ " \
84 -i $$filename; \
85 done;
86
87 $(Q)$(MAKE) --no-print-directory wget-listd md5sumsd
88
89pdf: validate
90 @echo "Generating profiled XML for PDF..."
91 $(Q)xsltproc --nonet \
92 --stringparam profile.condition pdf \
93 --stringparam profile.revision sysv \
94 --output $(RENDERTMP)/lfs-pdf.xml \
95 stylesheets/lfs-xsl/profile.xsl \
96 $(RENDERTMP)/lfs-full.xml
97
98 @echo "Generating FO file..."
99 $(Q)xsltproc --nonet \
100 --stringparam rootid "$(ROOT_ID)" \
101 --output $(RENDERTMP)/lfs-pdf.fo \
102 stylesheets/lfs-pdf.xsl \
103 $(RENDERTMP)/lfs-pdf.xml
104
105 $(Q)sed -i -e 's/span="inherit"/span="all"/' $(RENDERTMP)/lfs-pdf.fo
106 $(Q)bash pdf-fixups.sh $(RENDERTMP)/lfs-pdf.fo
107
108 @echo "Generating PDF file..."
109 $(Q)mkdir -p $(BASEDIR)
110
111 $(Q)fop -q $(RENDERTMP)/lfs-pdf.fo $(BASEDIR)/$(PDF_OUTPUT) 2>fop.log
112 @echo "$(BASEDIR)/$(PDF_OUTPUT) created"
113 @echo "fop.log created"
114
115nochunks: validate profile-html
116 $(Q)xsltproc --nonet \
117 --output $(RENDERTMP)/lfs-html2.xml \
118 --stringparam profile.revision sysv \
119 stylesheets/lfs-xsl/profile.xsl \
120 $(RENDERTMP)/lfs-html.xml
121
122 @echo "Generating non chunked XHTML file..."
123 $(Q)xsltproc --nonet \
124 --stringparam rootid "$(ROOT_ID)" \
125 --output $(BASEDIR)/$(NOCHUNKS_OUTPUT) \
126 stylesheets/lfs-nochunks.xsl \
127 $(RENDERTMP)/lfs-html2.xml
128
129 @echo "Running Tidy..."
130 $(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true
131
132 @echo "Running obfuscate.sh..."
133 $(Q)bash obfuscate.sh $(BASEDIR)/$(NOCHUNKS_OUTPUT)
134 $(Q)sed -i -e "s@text/html@application/xhtml+xml@g" $(BASEDIR)/$(NOCHUNKS_OUTPUT)
135 $(Q)sed -i -e "s@../wget-list@wget-list@" $(BASEDIR)/$(NOCHUNKS_OUTPUT)
136 $(Q)sed -i -e "s@../md5sums@md5sums@" $(BASEDIR)/$(NOCHUNKS_OUTPUT)
137 $(Q)sed -i -e "s@\xa9@\&copy;@" $(BASEDIR)/$(NOCHUNKS_OUTPUT)
138
139 @echo "Output at $(BASEDIR)/$(NOCHUNKS_OUTPUT)"
140
141nochunksd: validated profile-html
142 $(Q)xsltproc --nonet \
143 --output $(RENDERTMP)/lfs-html2.xml \
144 --stringparam profile.revision systemd \
145 stylesheets/lfs-xsl/profile.xsl \
146 $(RENDERTMP)/lfs-html.xml
147
148 @echo "Generating non chunked XHTML file..."
149 $(Q)xsltproc --nonet \
150 --stringparam rootid "$(ROOT_ID)" \
151 --output $(SYSDDIR)/$(NOCHUNKS_SYSD_FILE) \
152 stylesheets/lfs-nochunks.xsl \
153 $(RENDERTMP)/lfs-html2.xml
154
155 @echo "Running Tidy..."
156 $(Q)tidy -config tidy.conf $(SYSDDIR)/$(NOCHUNKS_SYSD_FILE) || true
157
158 @echo "Running obfuscate.sh..."
159 $(Q)bash obfuscate.sh $(SYSDDIR)/$(NOCHUNKS_SYSD_FILE)
160 $(Q)sed -i -e "s@text/html@application/xhtml+xml@g" $(SYSDDIR)/$(NOCHUNKS_SYSD_FILE)
161 $(Q)sed -i -e "s@../wget-list@wget-list@" $(SYSDDIR)/$(NOCHUNKS_SYSD_FILE)
162 $(Q)sed -i -e "s@../md5sums@md5sums@" $(SYSDDIR)/$(NOCHUNKS_SYSD_FILE)
163 $(Q)sed -i -e "s@\xa9@\&copy;@" $(SYSDDIR)/$(NOCHUNKS_SYSD_FILE)
164
165 @echo "Output at $(SYSDDIR)/$(NOCHUNKS_SYSD_FILE)"
166
167tmpdir:
168 @echo "Creating and cleaning $(RENDERTMP)"
169 $(Q)mkdir -p $(RENDERTMP)
170 $(Q)rm -f $(RENDERTMP)/lfs*.xml
171 $(Q)rm -f $(RENDERTMP)/sysd*.xml
172 $(Q)rm -f $(RENDERTMP)/*pdf.fo
173
174validate: tmpdir
175 @echo "Processing bootscripts..."
176 $(Q)bash process-scripts.sh
177 @echo "Validating the book..."
178 $(Q)xmllint --nonet \
179 --noent \
180 --xinclude \
181 --postvalid \
182 -o $(RENDERTMP)/lfs-full.xml \
183 index.xml
184 $(Q)rm -f appendices/*.script
185 $(Q)./aux-file-data.sh $(RENDERTMP)/lfs-full.xml
186 @echo "Validation complete."
187
188validated: tmpdir
189 @echo "Validating the book..."
190 $(Q)xmllint --nonet \
191 --noent \
192 --xinclude \
193 --postvalid \
194 -o $(RENDERTMP)/lfs-full.xml \
195 indexd.xml
196 @echo "Validation complete."
197
198profile-html:
199 @echo "Generating profiled XML for XHTML..."
200 $(Q)xsltproc --nonet \
201 --stringparam profile.condition html \
202 --output $(RENDERTMP)/lfs-html.xml \
203 stylesheets/lfs-xsl/profile.xsl \
204 $(RENDERTMP)/lfs-full.xml
205
206wget-list: $(BASEDIR)/wget-list
207$(BASEDIR)/wget-list: stylesheets/wget-list.xsl chapter03/chapter03.xml \
208 packages.ent patches.ent
209 @echo "Generating wget list for sysv..."
210 $(Q)mkdir -p $(BASEDIR)
211
212 $(Q)xsltproc --nonet --xinclude \
213 --stringparam profile.revision sysv \
214 --output $(RENDERTMP)/sysd-wget.xml \
215 stylesheets/lfs-xsl/profile.xsl \
216 chapter03/chapter03.xml
217
218 $(Q)xsltproc --xinclude --nonet \
219 --output $(BASEDIR)/wget-list \
220 stylesheets/wget-list.xsl \
221 chapter03/chapter03.xml
222
223wget-listd: $(SYSDDIR)/wget-listd
224$(SYSDDIR)/wget-listd: stylesheets/wget-list.xsl chapter03/chapter03.xml \
225 packages.ent patches.ent
226 @echo "Generating wget list for systemd..."
227 $(Q)mkdir -p $(SYSDDIR)
228
229 $(Q)xsltproc --xinclude --nonet \
230 --stringparam profile.revision systemd \
231 --output $(RENDERTMP)/sysd-wget.xml \
232 stylesheets/lfs-xsl/profile.xsl \
233 chapter03/chapter03.xml
234
235 $(Q)xsltproc --xinclude --nonet \
236 --output $(SYSDDIR)/wget-list \
237 stylesheets/wget-list.xsl \
238 $(RENDERTMP)/sysd-wget.xml
239
240md5sums: $(BASEDIR)/md5sums
241$(BASEDIR)/md5sums: stylesheets/wget-list.xsl chapter03/chapter03.xml \
242 packages.ent patches.ent
243 @echo "Generating md5sum file for sysv..."
244 $(Q)mkdir -p $(BASEDIR)
245
246 $(Q)xsltproc --nonet --xinclude \
247 --stringparam profile.revision sysv \
248 --output $(RENDERTMP)/sysv-md5sum.xml \
249 stylesheets/lfs-xsl/profile.xsl \
250 chapter03/chapter03.xml
251
252 $(Q)xsltproc --xinclude --nonet \
253 --output $(BASEDIR)/md5sums \
254 stylesheets/md5sum.xsl \
255 $(RENDERTMP)/sysv-md5sum.xml
256 $(Q)sed -i -e \
257 "s/BOOTSCRIPTS-MD5SUM/$(shell md5sum lfs-bootscripts*.tar.bz2 | cut -d' ' -f1)/" \
258 $(BASEDIR)/md5sums
259
260md5sumsd: $(SYSDDIR)/md5sums
261$(SYSDDIR)/md5sums: stylesheets/wget-list.xsl chapter03/chapter03.xml \
262 packages.ent patches.ent
263 @echo "Generating md5sum file for systemd..."
264 $(Q)mkdir -p $(SYSDDIR)
265 $(Q)xsltproc --nonet --xinclude \
266 --stringparam profile.revision systemd \
267 --output $(RENDERTMP)/sysd-md5sum.xml \
268 stylesheets/lfs-xsl/profile.xsl \
269 chapter03/chapter03.xml
270
271 $(Q)xsltproc --xinclude --nonet \
272 --output $(SYSDDIR)/md5sums \
273 stylesheets/md5sum.xsl \
274 $(RENDERTMP)/sysd-md5sum.xml
275
276dump-commands: validate
277 @echo "Dumping book commands..."
278 $(Q)xsltproc --nonet \
279 --output $(RENDERTMP)/lfs-html.xml \
280 --stringparam profile.revision sysv \
281 stylesheets/lfs-xsl/profile.xsl \
282 $(RENDERTMP)/lfs-full.xml
283
284 $(Q)rm -rf $(DUMPDIR)
285
286 $(Q)xsltproc --output $(DUMPDIR)/ \
287 stylesheets/dump-commands.xsl \
288 $(RENDERTMP)/lfs-html.xml
289 @echo "Dumping book commands complete in $(DUMPDIR)"
290
291dump-commandsd: validated
292 @echo "Dumping book commands..."
293 $(Q)xsltproc --nonet \
294 --output $(RENDERTMP)/lfs-html.xml \
295 --stringparam profile.revision systemd \
296 stylesheets/lfs-xsl/profile.xsl \
297 $(RENDERTMP)/lfs-full.xml
298
299 $(Q)rm -rf $(DUMPDIR)
300
301 $(Q)xsltproc --output $(DUMPDIR)/ \
302 stylesheets/dump-commands.xsl \
303 $(RENDERTMP)/lfs-html.xml
304 @echo "Dumping book commands complete in $(DUMPDIR)"
305
306all: lfs nochunks pdf dump-commands
307
308.PHONY : all sysv systemd dump-commands lfs nochunks pdf profile-html tmpdir validate
309
Note: See TracBrowser for help on using the repository browser.