Changeset 77ab7f3
- Timestamp:
- 05/25/2016 02:51:36 AM (8 years ago)
- Branches:
- 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, 12.2, 12.2-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/loongarch-12.2, xry111/mips64el, xry111/multilib, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- 188e34c
- Parents:
- 1118b17
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
r1118b17 r77ab7f3 7 7 PDF_OUTPUT = LFS-BOOK.pdf 8 8 NOCHUNKS_OUTPUT = LFS-BOOK.html 9 NOCHUNKS_SYSD_FILE = LFS-SYSD-BOOK.html 9 10 SHELL = /bin/bash 10 11 … … 31 32 32 33 @echo "Copying CSS code and images..." 33 $(Q)if [ ! -e $(BASEDIR)/stylesheets ]; then \ 34 mkdir -p $(BASEDIR)/stylesheets; \ 35 fi; 34 $(Q)mkdir -p $(BASEDIR)/stylesheets 36 35 $(Q)cp stylesheets/lfs-xsl/*.css $(BASEDIR)/stylesheets 37 $(Q)pushd $(BASEDIR)/ ; sed -i -e "s@../stylesheets@stylesheets@g" *.html; popd38 39 $(Q)if [ ! -e $(BASEDIR)/images ]; then \ 40 mkdir -p $(BASEDIR)/images; \ 41 fi;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 42 41 $(Q)cp images/*.png $(BASEDIR)/images 43 # $(Q)pushd $(BASEDIR)/; sed -i -e "s@../images@images@g" *.html; popd44 42 45 43 @echo "Running Tidy and obfuscate.sh..." 46 44 $(Q)for filename in `find $(BASEDIR) -name "*.html"`; do \ 47 tidy -config tidy.conf $$filename;\48 true;\49 /bin/bash obfuscate.sh $$filename;\50 51 -e "s/\xa9/\©/ " \52 -i $$filename;\53 54 55 $(Q)$(MAKE) $(BASEDIR)/wget-list $(BASEDIR)/md5sums45 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/\©/ " \ 50 -i $$filename; \ 51 done; 52 53 $(Q)$(MAKE) --no-print-directory wget-list md5sums 56 54 57 55 systemd: validated profile-html … … 71 69 72 70 @echo "Copying CSS code and images..." 73 $(Q)if [ ! -e $(SYSDDIR)/stylesheets ]; then \ 74 mkdir -p $(SYSDDIR)/stylesheets; \ 75 fi; 71 $(Q)mkdir -p $(SYSDDIR)/stylesheets 76 72 $(Q)cp stylesheets/lfs-xsl/*.css $(SYSDDIR)/stylesheets 77 73 78 $(Q)if [ ! -e $(SYSDDIR)/images ]; then \ 79 mkdir -p $(SYSDDIR)/images; \ 80 fi; 74 $(Q)mkdir -p $(SYSDDIR)/images 81 75 $(Q)cp images/*.png $(SYSDDIR)/images 82 76 83 77 @echo "Running Tidy and obfuscate.sh..." 84 78 $(Q)for filename in `find $(SYSDDIR) -name "*.html"`; do \ 85 tidy -config tidy.conf $$filename;\86 true;\87 /bin/bash obfuscate.sh $$filename;\88 89 -e "s/\xa9/\©/ " \90 -i $$filename;\91 92 93 # $(Q)$(MAKE) $(SYSDDIR)/wget-list $(SYSDDIR)/md5sumsd79 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/\©/ " \ 84 -i $$filename; \ 85 done; 86 87 $(Q)$(MAKE) --no-print-directory wget-listd md5sumsd 94 88 95 89 pdf: validate 96 90 @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 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 100 97 101 98 @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 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 105 $(Q)sed -i -e 's/span="inherit"/span="all"/' $(RENDERTMP)/lfs-pdf.fo 106 106 $(Q)bash pdf-fixups.sh $(RENDERTMP)/lfs-pdf.fo 107 107 108 108 @echo "Generating PDF file..." 109 $(Q)if [ ! -e $(BASEDIR) ]; then \ 110 mkdir -p $(BASEDIR); \ 111 fi; 109 $(Q)mkdir -p $(BASEDIR) 110 112 111 $(Q)fop -q $(RENDERTMP)/lfs-pdf.fo $(BASEDIR)/$(PDF_OUTPUT) 2>fop.log 113 112 @echo "$(BASEDIR)/$(PDF_OUTPUT) created" … … 115 114 116 115 nochunks: 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 117 122 @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 123 $(Q)xsltproc --nonet \ 124 --stringparam rootid "$(ROOT_ID)" \ 125 --output $(BASEDIR)/$(NOCHUNKS_OUTPUT) \ 126 stylesheets/lfs-nochunks.xsl \ 127 $(RENDERTMP)/lfs-html2.xml 121 128 122 129 @echo "Running Tidy..." 123 130 $(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true 131 124 132 @echo "Running obfuscate.sh..." 125 133 $(Q)bash obfuscate.sh $(BASEDIR)/$(NOCHUNKS_OUTPUT) … … 127 135 $(Q)sed -i -e "s@../wget-list@wget-list@" $(BASEDIR)/$(NOCHUNKS_OUTPUT) 128 136 $(Q)sed -i -e "s@../md5sums@md5sums@" $(BASEDIR)/$(NOCHUNKS_OUTPUT) 129 $(Q)$(MAKE) $(BASEDIR)/wget-list $(BASEDIR)/md5sums 137 $(Q)sed -i -e "s@\xa9@\©@" $(BASEDIR)/$(NOCHUNKS_OUTPUT) 138 139 @echo "Output at $(BASEDIR)/$(NOCHUNKS_OUTPUT)" 140 141 nochunksd: 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@\©@" $(SYSDDIR)/$(NOCHUNKS_SYSD_FILE) 164 165 @echo "Output at $(SYSDDIR)/$(NOCHUNKS_SYSD_FILE)" 130 166 131 167 tmpdir: 132 168 @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 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 136 173 137 174 validate: tmpdir … … 139 176 $(Q)bash process-scripts.sh 140 177 @echo "Validating the book..." 141 $(Q)xmllint --nonet --noent --xinclude --postvalid \ 142 -o $(RENDERTMP)/lfs-full.xml index.xml 178 $(Q)xmllint --nonet \ 179 --noent \ 180 --xinclude \ 181 --postvalid \ 182 -o $(RENDERTMP)/lfs-full.xml \ 183 index.xml 143 184 $(Q)rm -f appendices/*.script 144 185 $(Q)./aux-file-data.sh $(RENDERTMP)/lfs-full.xml … … 147 188 validated: tmpdir 148 189 @echo "Validating the book..." 149 $(Q)xmllint --nonet --noent --xinclude --postvalid \ 150 -o $(RENDERTMP)/lfs-full.xml indexd.xml 190 $(Q)xmllint --nonet \ 191 --noent \ 192 --xinclude \ 193 --postvalid \ 194 -o $(RENDERTMP)/lfs-full.xml \ 195 indexd.xml 151 196 @echo "Validation complete." 152 197 153 198 profile-html: 154 199 @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 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 158 205 159 206 wget-list: $(BASEDIR)/wget-list 160 $(BASEDIR)/wget-list: stylesheets/wget-list.xsl chapter03/chapter03.xml packages.ent patches.ent 161 @echo "Generating 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..." 162 210 $(Q)mkdir -p $(BASEDIR) 163 $(Q)xsltproc --xinclude --nonet --output $(BASEDIR)/wget-list \ 164 stylesheets/wget-list.xsl chapter03/chapter03.xml 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 223 wget-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 165 239 166 240 md5sums: $(BASEDIR)/md5sums 167 $(BASEDIR)/md5sums: stylesheets/wget-list.xsl chapter03/chapter03.xml packages.ent patches.ent 168 @echo "Generating md5sum file..." 241 $(BASEDIR)/md5sums: stylesheets/wget-list.xsl chapter03/chapter03.xml \ 242 packages.ent patches.ent 243 @echo "Generating md5sum file for sysv..." 169 244 $(Q)mkdir -p $(BASEDIR) 170 $(Q)xsltproc --xinclude --nonet --output $(BASEDIR)/md5sums \ 171 stylesheets/md5sum.xsl chapter03/chapter03.xml 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 172 256 $(Q)sed -i -e \ 173 257 "s/BOOTSCRIPTS-MD5SUM/$(shell md5sum lfs-bootscripts*.tar.bz2 | cut -d' ' -f1)/" \ 174 258 $(BASEDIR)/md5sums 175 259 176 md5sumsd: $(SYSDDIR)/md5sumsd 177 $(SYSDDIR)/md5sumsd: stylesheets/wget-list.xsl chapter03/chapter03.xml packages.ent patches.ent 178 @echo "Generating md5sum file..." 260 md5sumsd: $(SYSDDIR)/md5sums 261 $(SYSDDIR)/md5sums: stylesheets/wget-list.xsl chapter03/chapter03.xml \ 262 packages.ent patches.ent 263 @echo "Generating md5sum file for systemd..." 179 264 $(Q)mkdir -p $(SYSDDIR) 180 $(Q)xsltproc --xinclude --nonet --output $(SYSDDIR)/md5sums \ 181 stylesheets/md5sum.xsl chapter03/chapter03.xml 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 182 275 183 276 dump-commands: validate 184 277 @echo "Dumping book commands..." 185 $(Q)xsltproc --output $(DUMPDIR)/ \ 186 stylesheets/dump-commands.xsl $(RENDERTMP)/lfs-full.xml 187 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 291 dump-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)" 188 305 189 306 all: lfs nochunks pdf dump-commands 190 307 191 .PHONY : all dump-commands lfs nochunks pdf profile-html tmpdir validate192 308 .PHONY : all sysv systemd dump-commands lfs nochunks pdf profile-html tmpdir validate 309 -
chapter01/changelog.xml
r1118b17 r77ab7f3 19 19 book.</para> 20 20 21 <para revision="systemd">A test</para>22 23 21 <itemizedlist> 24 22 <title>Changelog Entries:</title> -
chapter03/packages.xml
r1118b17 r77ab7f3 374 374 </varlistentry> 375 375 376 <varlistentry >376 <varlistentry revision="sysv"> 377 377 <term>LFS-Bootscripts (&lfs-bootscripts-version;) - <token>&lfs-bootscripts-size;</token>:</term> 378 378 <listitem> -
stylesheets/wget-list.xsl
r1118b17 r77ab7f3 17 17 name, the next test must be fixed to match it also. Skip possible 18 18 duplicated URLs due that may be splitted for PDF output --> 19 <xsl:if test="(contains(@url, '.tar.') or contains(@url, '.tgz') 20 or contains(@url, '.patch')) and 19 <xsl:if test="(contains(@url, '.tar.') or 20 contains(@url, '.tgz') or 21 contains(@url, '.patch')) and 21 22 not(ancestor-or-self::*/@condition = 'pdf')"> 22 23 <xsl:choose>
Note:
See TracChangeset
for help on using the changeset viewer.