- Timestamp:
- 05/25/2016 11:16:12 PM (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, 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
- Children:
- cbd8bf0f
- Parents:
- 188e34c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
r188e34c r35a5259 1 BASEDIR = ~/lfs-book2 SYSDDIR = ~/lfs-systemd3 DUMPDIR = ~/lfs-commands1 #BASEDIR = ~/lfs-book 2 #SYSDDIR = ~/lfs-systemd 3 #DUMPDIR = ~/lfs-commands 4 4 RENDERTMP = $(HOME)/tmp 5 5 CHUNK_QUIET = 1 6 6 ROOT_ID = 7 PDF_OUTPUT = LFS-BOOK.pdf8 PDF_SYSD_OUTPUT = LFS-SYSD-BOOK.pdf9 NOCHUNKS_OUTPUT = LFS-BOOK.html10 NOCHUNKS_SYSD_FILE = LFS-SYSD-BOOK.html11 7 SHELL = /bin/bash 12 8 … … 17 13 endif 18 14 19 sysv: validate profile-html 20 $(Q)xsltproc --nonet \ 21 --output $(RENDERTMP)/lfs-html2.xml \ 22 --stringparam profile.revision sysv \ 23 stylesheets/lfs-xsl/profile.xsl \ 24 $(RENDERTMP)/lfs-html.xml 25 26 @echo "Generating chunked XHTML files..." 15 ifndef REV 16 REV = sysv 17 endif 18 19 ifneq ($(REV), sysv) 20 ifneq ($(REV), systemd) 21 $(error REV must be 'sysv' (default) or 'systemd'.) 22 endif 23 endif 24 25 ifeq ($(REV), sysv) 26 BASEDIR = ~/lfs-book 27 PDF_OUTPUT = LFS-BOOK.pdf 28 NOCHUNKS_OUTPUT = LFS-BOOK.html 29 DUMPDIR = ~/lfs-commands 30 else 31 BASEDIR = ~/lfs-systemd 32 PDF_OUTPUT = LFS-SYSD-BOOK.pdf 33 NOCHUNKS_OUTPUT = LFS-SYSD-BOOK.html 34 DUMPDIR = ~/lfs-sysd-commands 35 endif 36 37 book: validate profile-html 38 @echo "Generating chunked XHTML files at $(BASEDIR)/ ..." 27 39 $(Q)xsltproc --nonet \ 28 40 --stringparam chunk.quietly $(CHUNK_QUIET) \ … … 54 66 $(Q)$(MAKE) --no-print-directory wget-list md5sums 55 67 56 systemd: validated profile-html57 $(Q)xsltproc --nonet \58 --output $(RENDERTMP)/lfs-html2.xml \59 --stringparam profile.revision systemd \60 stylesheets/lfs-xsl/profile.xsl \61 $(RENDERTMP)/lfs-html.xml62 63 @echo "Generating chunked XHTML files..."64 $(Q)xsltproc --nonet \65 --stringparam chunk.quietly $(CHUNK_QUIET) \66 --stringparam rootid "$(ROOT_ID)" \67 --stringparam base.dir $(SYSDDIR)/ \68 stylesheets/lfs-chunked.xsl \69 $(RENDERTMP)/lfs-html2.xml70 71 @echo "Copying CSS code and images..."72 $(Q)mkdir -p $(SYSDDIR)/stylesheets73 $(Q)cp stylesheets/lfs-xsl/*.css $(SYSDDIR)/stylesheets74 75 $(Q)mkdir -p $(SYSDDIR)/images76 $(Q)cp images/*.png $(SYSDDIR)/images77 78 @echo "Running Tidy and obfuscate.sh..."79 $(Q)for filename in `find $(SYSDDIR) -name "*.html"`; do \80 tidy -config tidy.conf $$filename; \81 true; \82 /bin/bash obfuscate.sh $$filename; \83 sed -e "s@text/html@application/xhtml+xml@g" \84 -e "s/\xa9/\©/ " \85 -i $$filename; \86 done;87 88 $(Q)$(MAKE) --no-print-directory wget-listd md5sumsd89 90 68 pdf: validate 91 69 @echo "Generating profiled XML for PDF..." 92 70 $(Q)xsltproc --nonet \ 93 71 --stringparam profile.condition pdf \ 94 --stringparam profile.revision sysv \95 72 --output $(RENDERTMP)/lfs-pdf.xml \ 96 73 stylesheets/lfs-xsl/profile.xsl \ 97 $(RENDERTMP)/lfs- full.xml74 $(RENDERTMP)/lfs-html2.xml 98 75 99 76 @echo "Generating FO file..." … … 114 91 @echo "fop.log created" 115 92 116 pdfd: validated117 @echo "Generating profiled XML for PDF..."118 $(Q)xsltproc --nonet \119 --stringparam profile.condition pdf \120 --stringparam profile.revision systemd \121 --output $(RENDERTMP)/lfs-pdf.xml \122 stylesheets/lfs-xsl/profile.xsl \123 $(RENDERTMP)/lfs-full.xml124 125 @echo "Generating FO file..."126 $(Q)xsltproc --nonet \127 --stringparam rootid "$(ROOT_ID)" \128 --output $(RENDERTMP)/lfs-pdf.fo \129 stylesheets/lfs-pdf.xsl \130 $(RENDERTMP)/lfs-pdf.xml131 132 $(Q)sed -i -e 's/span="inherit"/span="all"/' $(RENDERTMP)/lfs-pdf.fo133 $(Q)bash pdf-fixups.sh $(RENDERTMP)/lfs-pdf.fo134 135 @echo "Generating PDF file..."136 $(Q)mkdir -p $(SYSDDIR)137 138 $(Q)fop -q $(RENDERTMP)/lfs-pdf.fo $(SYSDDIR)/$(PDF_SYSD_OUTPUT) 2>fop.log139 @echo "$(SYSDDIR)/$(PDF_SYSD_OUTPUT) created"140 @echo "fop.log created"141 142 93 nochunks: validate profile-html 143 $(Q)xsltproc --nonet \144 --output $(RENDERTMP)/lfs-html2.xml \145 --stringparam profile.revision sysv \146 stylesheets/lfs-xsl/profile.xsl \147 $(RENDERTMP)/lfs-html.xml148 149 94 @echo "Generating non chunked XHTML file..." 150 95 $(Q)xsltproc --nonet \ … … 166 111 @echo "Output at $(BASEDIR)/$(NOCHUNKS_OUTPUT)" 167 112 168 nochunksd: validated profile-html169 $(Q)xsltproc --nonet \170 --output $(RENDERTMP)/lfs-html2.xml \171 --stringparam profile.revision systemd \172 stylesheets/lfs-xsl/profile.xsl \173 $(RENDERTMP)/lfs-html.xml174 175 @echo "Generating non chunked XHTML file..."176 $(Q)xsltproc --nonet \177 --stringparam rootid "$(ROOT_ID)" \178 --output $(SYSDDIR)/$(NOCHUNKS_SYSD_FILE) \179 stylesheets/lfs-nochunks.xsl \180 $(RENDERTMP)/lfs-html2.xml181 182 @echo "Running Tidy..."183 $(Q)tidy -config tidy.conf $(SYSDDIR)/$(NOCHUNKS_SYSD_FILE) || true184 185 @echo "Running obfuscate.sh..."186 $(Q)bash obfuscate.sh $(SYSDDIR)/$(NOCHUNKS_SYSD_FILE)187 $(Q)sed -i -e "s@text/html@application/xhtml+xml@g" $(SYSDDIR)/$(NOCHUNKS_SYSD_FILE)188 $(Q)sed -i -e "s@../wget-list@wget-list@" $(SYSDDIR)/$(NOCHUNKS_SYSD_FILE)189 $(Q)sed -i -e "s@../md5sums@md5sums@" $(SYSDDIR)/$(NOCHUNKS_SYSD_FILE)190 $(Q)sed -i -e "s@\xa9@\©@" $(SYSDDIR)/$(NOCHUNKS_SYSD_FILE)191 192 @echo "Output at $(SYSDDIR)/$(NOCHUNKS_SYSD_FILE)"193 194 113 tmpdir: 195 114 @echo "Creating and cleaning $(RENDERTMP)" 196 115 $(Q)mkdir -p $(RENDERTMP) 197 116 $(Q)rm -f $(RENDERTMP)/lfs*.xml 198 $(Q)rm -f $(RENDERTMP)/sysd*.xml 117 $(Q)rm -f $(RENDERTMP)/*wget* 118 $(Q)rm -f $(RENDERTMP)/*md5sum* 199 119 $(Q)rm -f $(RENDERTMP)/*pdf.fo 200 120 … … 202 122 @echo "Processing bootscripts..." 203 123 $(Q)bash process-scripts.sh 124 125 @echo "Adjusting for revision $(REV)..." 126 $(Q)xsltproc --nonet \ 127 --xinclude \ 128 --output $(RENDERTMP)/lfs-html2.xml \ 129 --stringparam profile.revision $(REV) \ 130 stylesheets/lfs-xsl/profile.xsl \ 131 index.xml 132 204 133 @echo "Validating the book..." 205 134 $(Q)xmllint --nonet \ 206 135 --noent \ 207 --xinclude \208 136 --postvalid \ 209 137 -o $(RENDERTMP)/lfs-full.xml \ 210 index.xml 138 $(RENDERTMP)/lfs-html2.xml 139 211 140 $(Q)rm -f appendices/*.script 212 141 $(Q)./aux-file-data.sh $(RENDERTMP)/lfs-full.xml 213 @echo "Validation complete."214 215 validated: tmpdir216 @echo "Validating the book..."217 $(Q)xmllint --nonet \218 --noent \219 --xinclude \220 --postvalid \221 -o $(RENDERTMP)/lfs-full.xml \222 indexd.xml223 142 @echo "Validation complete." 224 143 … … 229 148 --output $(RENDERTMP)/lfs-html.xml \ 230 149 stylesheets/lfs-xsl/profile.xsl \ 231 $(RENDERTMP)/lfs- full.xml150 $(RENDERTMP)/lfs-html2.xml 232 151 233 152 wget-list: $(BASEDIR)/wget-list 234 153 $(BASEDIR)/wget-list: stylesheets/wget-list.xsl chapter03/chapter03.xml \ 235 154 packages.ent patches.ent 236 @echo "Generating wget list for sysv ..."155 @echo "Generating wget list for sysv at $(BASEDIR)/wget-list ..." 237 156 $(Q)mkdir -p $(BASEDIR) 238 157 239 $(Q)xsltproc --nonet --xinclude \240 --stringparam profile.revision sysv\241 --output $(RENDERTMP)/sysd-wget.xml \242 stylesheets/lfs-xsl/profile.xsl \158 $(Q)xsltproc --nonet --xinclude \ 159 --stringparam profile.revision $(REV) \ 160 --output $(RENDERTMP)/sysd-wget.xml \ 161 stylesheets/lfs-xsl/profile.xsl \ 243 162 chapter03/chapter03.xml 244 163 … … 248 167 chapter03/chapter03.xml 249 168 250 wget-listd: $(SYSDDIR)/wget-listd251 $(SYSDDIR)/wget-listd: stylesheets/wget-list.xsl chapter03/chapter03.xml \252 packages.ent patches.ent253 @echo "Generating wget list for systemd..."254 $(Q)mkdir -p $(SYSDDIR)255 256 $(Q)xsltproc --xinclude --nonet \257 --stringparam profile.revision systemd \258 --output $(RENDERTMP)/sysd-wget.xml \259 stylesheets/lfs-xsl/profile.xsl \260 chapter03/chapter03.xml261 262 $(Q)xsltproc --xinclude --nonet \263 --output $(SYSDDIR)/wget-list \264 stylesheets/wget-list.xsl \265 $(RENDERTMP)/sysd-wget.xml266 267 169 md5sums: $(BASEDIR)/md5sums 268 170 $(BASEDIR)/md5sums: stylesheets/wget-list.xsl chapter03/chapter03.xml \ 269 171 packages.ent patches.ent 270 @echo "Generating md5sum file for sysv ..."172 @echo "Generating md5sum file for sysv at $(BASEDIR)/md5sums ..." 271 173 $(Q)mkdir -p $(BASEDIR) 272 174 273 175 $(Q)xsltproc --nonet --xinclude \ 274 --stringparam profile.revision sysv\176 --stringparam profile.revision $(REV) \ 275 177 --output $(RENDERTMP)/sysv-md5sum.xml \ 276 178 stylesheets/lfs-xsl/profile.xsl \ … … 285 187 $(BASEDIR)/md5sums 286 188 287 md5sumsd: $(SYSDDIR)/md5sums288 $(SYSDDIR)/md5sums: stylesheets/wget-list.xsl chapter03/chapter03.xml \289 packages.ent patches.ent290 @echo "Generating md5sum file for systemd..."291 $(Q)mkdir -p $(SYSDDIR)292 $(Q)xsltproc --nonet --xinclude \293 --stringparam profile.revision systemd \294 --output $(RENDERTMP)/sysd-md5sum.xml \295 stylesheets/lfs-xsl/profile.xsl \296 chapter03/chapter03.xml297 298 $(Q)xsltproc --xinclude --nonet \299 --output $(SYSDDIR)/md5sums \300 stylesheets/md5sum.xsl \301 $(RENDERTMP)/sysd-md5sum.xml302 303 189 dump-commands: validate 304 190 @echo "Dumping book commands..." 305 $(Q)xsltproc --nonet \306 --output $(RENDERTMP)/lfs-html.xml \307 --stringparam profile.revision sysv\308 stylesheets/lfs-xsl/profile.xsl \191 $(Q)xsltproc --nonet \ 192 --output $(RENDERTMP)/lfs-html.xml \ 193 --stringparam profile.revision $(REV) \ 194 stylesheets/lfs-xsl/profile.xsl \ 309 195 $(RENDERTMP)/lfs-full.xml 310 196 … … 316 202 @echo "Dumping book commands complete in $(DUMPDIR)" 317 203 318 dump-commandsd: validated 319 @echo "Dumping book commands..." 320 $(Q)xsltproc --nonet \ 321 --output $(RENDERTMP)/lfs-html.xml \ 322 --stringparam profile.revision systemd \ 323 stylesheets/lfs-xsl/profile.xsl \ 324 $(RENDERTMP)/lfs-full.xml 325 326 $(Q)rm -rf $(DUMPDIR) 327 328 $(Q)xsltproc --output $(DUMPDIR)/ \ 329 stylesheets/dump-commands.xsl \ 330 $(RENDERTMP)/lfs-html.xml 331 @echo "Dumping book commands complete in $(DUMPDIR)" 332 333 all: lfs nochunks pdf dump-commands 334 335 .PHONY : all sysv systemd dump-commands lfs nochunks pdf profile-html tmpdir validate 336 204 all: book nochunks pdf dump-commands 205 206 .PHONY : all book dump-commands nochunks pdf profile-html tmpdir validate md5sums wget-list 207
Note:
See TracChangeset
for help on using the changeset viewer.