source: Makefile@ 1118b17

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 7.10 7.10-rc1 8.0 8.0-rc1 8.1 8.1-rc1 8.1-rc2 8.2 8.2-rc1 8.3 8.3-rc1 8.3-rc2 8.4 8.4-rc1 9.0 9.0-rc1 9.1 9.1-rc1 arm cross-chap5 ml-11.0 multilib nosym old-trunk trunk xry111/clfs-ng xry111/git-transition xry111/glibc-2.34 xry111/lfs-next xry111/tester-nohack xry111/usr-move
Last change on this file since 1118b17 was 1118b17, checked in by Bruce Dubbs <bdubbs@…>, 6 years ago

Create branches/merge in svn repo fo rtesting of merged LFS books

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

  • Property mode set to 100644
File size: 6.5 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
9SHELL = /bin/bash
10
11ifdef V
12 Q =
13else
14 Q = @
15endif
16
17sysv: validate profile-html
18 $(Q)xsltproc --nonet \
19 --output $(RENDERTMP)/lfs-html2.xml \
20 --stringparam profile.revision sysv \
21 stylesheets/lfs-xsl/profile.xsl \
22 $(RENDERTMP)/lfs-html.xml
23
24 @echo "Generating chunked XHTML files..."
25 $(Q)xsltproc --nonet \
26 --stringparam chunk.quietly $(CHUNK_QUIET) \
27 --stringparam rootid "$(ROOT_ID)" \
28 --stringparam base.dir $(BASEDIR)/ \
29 stylesheets/lfs-chunked.xsl \
30 $(RENDERTMP)/lfs-html2.xml
31
32 @echo "Copying CSS code and images..."
33 $(Q)if [ ! -e $(BASEDIR)/stylesheets ]; then \
34 mkdir -p $(BASEDIR)/stylesheets; \
35 fi;
36 $(Q)cp stylesheets/lfs-xsl/*.css $(BASEDIR)/stylesheets
37 $(Q)pushd $(BASEDIR)/; sed -i -e "s@../stylesheets@stylesheets@g" *.html; popd
38
39 $(Q)if [ ! -e $(BASEDIR)/images ]; then \
40 mkdir -p $(BASEDIR)/images; \
41 fi;
42 $(Q)cp images/*.png $(BASEDIR)/images
43# $(Q)pushd $(BASEDIR)/; sed -i -e "s@../images@images@g" *.html; popd
44
45 @echo "Running Tidy and obfuscate.sh..."
46 $(Q)for filename in `find $(BASEDIR) -name "*.html"`; do \
47 tidy -config tidy.conf $$filename; \
48 true; \
49 /bin/bash obfuscate.sh $$filename; \
50 sed -e "s@text/html@application/xhtml+xml@g" \
51 -e "s/\xa9/\&copy;/ " \
52 -i $$filename; \
53 done;
54
55 $(Q)$(MAKE) $(BASEDIR)/wget-list $(BASEDIR)/md5sums
56
57systemd: validated profile-html
58 $(Q)xsltproc --nonet \
59 --output $(RENDERTMP)/lfs-html2.xml \
60 --stringparam profile.revision systemd \
61 stylesheets/lfs-xsl/profile.xsl \
62 $(RENDERTMP)/lfs-html.xml
63
64 @echo "Generating chunked XHTML files..."
65 $(Q)xsltproc --nonet \
66 --stringparam chunk.quietly $(CHUNK_QUIET) \
67 --stringparam rootid "$(ROOT_ID)" \
68 --stringparam base.dir $(SYSDDIR)/ \
69 stylesheets/lfs-chunked.xsl \
70 $(RENDERTMP)/lfs-html2.xml
71
72 @echo "Copying CSS code and images..."
73 $(Q)if [ ! -e $(SYSDDIR)/stylesheets ]; then \
74 mkdir -p $(SYSDDIR)/stylesheets; \
75 fi;
76 $(Q)cp stylesheets/lfs-xsl/*.css $(SYSDDIR)/stylesheets
77
78 $(Q)if [ ! -e $(SYSDDIR)/images ]; then \
79 mkdir -p $(SYSDDIR)/images; \
80 fi;
81 $(Q)cp images/*.png $(SYSDDIR)/images
82
83 @echo "Running Tidy and obfuscate.sh..."
84 $(Q)for filename in `find $(SYSDDIR) -name "*.html"`; do \
85 tidy -config tidy.conf $$filename; \
86 true; \
87 /bin/bash obfuscate.sh $$filename; \
88 sed -e "s@text/html@application/xhtml+xml@g" \
89 -e "s/\xa9/\&copy;/ " \
90 -i $$filename; \
91 done;
92
93# $(Q)$(MAKE) $(SYSDDIR)/wget-list $(SYSDDIR)/md5sumsd
94
95pdf: validate
96 @echo "Generating profiled XML for PDF..."
97 $(Q)xsltproc --nonet --stringparam profile.condition pdf \
98 --output $(RENDERTMP)/lfs-pdf.xml stylesheets/lfs-xsl/profile.xsl \
99 $(RENDERTMP)/lfs-full.xml
100
101 @echo "Generating FO file..."
102 $(Q)xsltproc --nonet -stringparam rootid "$(ROOT_ID)" \
103 --output $(RENDERTMP)/lfs-pdf.fo stylesheets/lfs-pdf.xsl \
104 $(RENDERTMP)/lfs-pdf.xml
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)if [ ! -e $(BASEDIR) ]; then \
110 mkdir -p $(BASEDIR); \
111 fi;
112 $(Q)fop -q $(RENDERTMP)/lfs-pdf.fo $(BASEDIR)/$(PDF_OUTPUT) 2>fop.log
113 @echo "$(BASEDIR)/$(PDF_OUTPUT) created"
114 @echo "fop.log created"
115
116nochunks: validate profile-html
117 @echo "Generating non chunked XHTML file..."
118 $(Q)xsltproc --nonet -stringparam rootid "$(ROOT_ID)" \
119 --output $(BASEDIR)/$(NOCHUNKS_OUTPUT) \
120 stylesheets/lfs-nochunks.xsl $(RENDERTMP)/lfs-html.xml
121
122 @echo "Running Tidy..."
123 $(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true
124 @echo "Running obfuscate.sh..."
125 $(Q)bash obfuscate.sh $(BASEDIR)/$(NOCHUNKS_OUTPUT)
126 $(Q)sed -i -e "s@text/html@application/xhtml+xml@g" $(BASEDIR)/$(NOCHUNKS_OUTPUT)
127 $(Q)sed -i -e "s@../wget-list@wget-list@" $(BASEDIR)/$(NOCHUNKS_OUTPUT)
128 $(Q)sed -i -e "s@../md5sums@md5sums@" $(BASEDIR)/$(NOCHUNKS_OUTPUT)
129 $(Q)$(MAKE) $(BASEDIR)/wget-list $(BASEDIR)/md5sums
130
131tmpdir:
132 @echo "Creating and cleaning $(RENDERTMP)"
133 $(Q)[ -d $(RENDERTMP) ] || mkdir -p $(RENDERTMP)
134 $(Q)rm -f $(RENDERTMP)/lfs-{full,html,pdf}.xml
135 $(Q)rm -f $(RENDERTMP)/lfs-pdf.fo
136
137validate: tmpdir
138 @echo "Processing bootscripts..."
139 $(Q)bash process-scripts.sh
140 @echo "Validating the book..."
141 $(Q)xmllint --nonet --noent --xinclude --postvalid \
142 -o $(RENDERTMP)/lfs-full.xml index.xml
143 $(Q)rm -f appendices/*.script
144 $(Q)./aux-file-data.sh $(RENDERTMP)/lfs-full.xml
145 @echo "Validation complete."
146
147validated: tmpdir
148 @echo "Validating the book..."
149 $(Q)xmllint --nonet --noent --xinclude --postvalid \
150 -o $(RENDERTMP)/lfs-full.xml indexd.xml
151 @echo "Validation complete."
152
153profile-html:
154 @echo "Generating profiled XML for XHTML..."
155 $(Q)xsltproc --nonet --stringparam profile.condition html \
156 --output $(RENDERTMP)/lfs-html.xml stylesheets/lfs-xsl/profile.xsl \
157 $(RENDERTMP)/lfs-full.xml
158
159wget-list: $(BASEDIR)/wget-list
160$(BASEDIR)/wget-list: stylesheets/wget-list.xsl chapter03/chapter03.xml packages.ent patches.ent
161 @echo "Generating wget list..."
162 $(Q)mkdir -p $(BASEDIR)
163 $(Q)xsltproc --xinclude --nonet --output $(BASEDIR)/wget-list \
164 stylesheets/wget-list.xsl chapter03/chapter03.xml
165
166md5sums: $(BASEDIR)/md5sums
167$(BASEDIR)/md5sums: stylesheets/wget-list.xsl chapter03/chapter03.xml packages.ent patches.ent
168 @echo "Generating md5sum file..."
169 $(Q)mkdir -p $(BASEDIR)
170 $(Q)xsltproc --xinclude --nonet --output $(BASEDIR)/md5sums \
171 stylesheets/md5sum.xsl chapter03/chapter03.xml
172 $(Q)sed -i -e \
173 "s/BOOTSCRIPTS-MD5SUM/$(shell md5sum lfs-bootscripts*.tar.bz2 | cut -d' ' -f1)/" \
174 $(BASEDIR)/md5sums
175
176md5sumsd: $(SYSDDIR)/md5sumsd
177$(SYSDDIR)/md5sumsd: stylesheets/wget-list.xsl chapter03/chapter03.xml packages.ent patches.ent
178 @echo "Generating md5sum file..."
179 $(Q)mkdir -p $(SYSDDIR)
180 $(Q)xsltproc --xinclude --nonet --output $(SYSDDIR)/md5sums \
181 stylesheets/md5sum.xsl chapter03/chapter03.xml
182
183dump-commands: validate
184 @echo "Dumping book commands..."
185 $(Q)xsltproc --output $(DUMPDIR)/ \
186 stylesheets/dump-commands.xsl $(RENDERTMP)/lfs-full.xml
187
188
189all: lfs nochunks pdf dump-commands
190
191.PHONY : all dump-commands lfs nochunks pdf profile-html tmpdir validate
192
Note: See TracBrowser for help on using the repository browser.