Changes in / [8c3f58f:1f9faab]
- Files:
-
- 12 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
.gitignore
r8c3f58f r1f9faab 1 /BOOK/render-output 2 /render/ 1 BOOK/render-output -
BOOK/Makefile
r8c3f58f r1f9faab 1 1 TOP := $(PWD) 2 RENDERDIR := $(TOP)/../render3 2 4 VALIDATEDIR := $(RENDERDIR)/validate 5 PROFILEDIR := $(RENDERDIR)/profile 3 WORKDIR := $(TOP)/render-output 6 4 7 HTMLDIR := $(RENDERDIR)/html 8 NOCHUNKDIR := $(RENDERDIR)/nochunk 5 BASEDIR := $(WORKDIR)/cross-lfs-book 6 DUMPDIR := $(WORKDIR)/cross-lfs-commands 7 DLLISTDIR := $(WORKDIR)/cross-lfs-dllist 8 RENDERTMP := $(WORKDIR)/tmp 9 CHUNK_QUIET := 1 10 ROOT_ID := 9 11 10 FODIR := $(RENDERDIR)/fo 11 PDFDIR := $(RENDERDIR)/pdf 12 13 TROUBLEDIR := $(RENDERDIR)/trouble 14 DUMPDIR := $(RENDERDIR)/commands 15 DLLISTDIR := $(RENDERDIR)/download-list 16 17 CHUNK_QUIET := 1 18 ROOT_ID := 12 FG_GREEN := $(shell echo -e '\e[0;32m') 13 FG_BLUE := $(shell echo -e '\e[0;34m') 14 FG_DEFAULT := $(shell echo -e '\e[0;0m') 19 15 20 16 ARCHS := x86 x86_64 x86_64-64 \ … … 24 20 alpha 25 21 22 ARCHS_VD_XML := $(ARCHS:%=%-validate_dump-xml) 23 ARCHS_P_XML := $(ARCHS:%=%-profiled-xml) 24 25 ARCHS_HTML := $(ARCHS:%=%-html) 26 ARCHS_NOCHUNKS := $(ARCHS:%=%-nochunks) 27 ARCHS_PDF := $(ARCHS:%=%-pdf) 28 ARCHS_VALIDATE := $(ARCHS:%=%-validate) 29 ARCHS_TROUBLE := $(ARCHS:%=%-trouble) 30 ARCHS_DUMP := $(ARCHS:%=%-dump) 31 ARCHS_DLLIST := $(ARCHS:%=%-dllist) 32 26 33 ifdef V 27 34 Q = … … 30 37 endif 31 38 32 .PHONY: clfs lfs 33 clfs lfs: html 39 .PHONY: clfs lfs render nochunks pdf validate trouble dump-commands download-list 40 clfs lfs: tmpdir render 41 render: $(ARCHS_HTML) titlepage 42 nochunks: tmpdir $(ARCHS_NOCHUNKS) 43 pdf: tmpdir $(ARCHS_PDF) 44 validate: $(ARCHS_VALIDATE) 45 trouble: tmpdir $(ARCHS_TROUBLE) 46 dump-commands: $(ARCHS_DUMP) 47 download-list: $(ARCHS_DLLIST) 48 49 .PHONY: tmpdir 50 tmpdir: 51 $(Q)mkdir -p $(RENDERTMP) 34 52 35 53 .PHONY: tidy tidy-f tidy-d 36 54 ifeq ($(shell which tidy >/dev/null 2>&1 && echo yes),yes) 37 55 tidy: 38 @$(MAKE) --no-print-directory tidy-d TIDY_DIR=$( HTMLDIR)56 @$(MAKE) --no-print-directory tidy-d TIDY_DIR=$(BASEDIR) 39 57 40 58 tidy-f: … … 53 71 titlepage: 54 72 @echo "Rendering the top-level index..." 55 $(Q)xsltproc --nonet --output $(HTMLDIR)/index.html \ 56 $(PWD)/stylesheets/top-index.xsl \ 57 $(PWD)/index.xml 58 @$(MAKE) --no-print-directory tidy-f TIDY_FILE=$(HTMLDIR)/index.html 73 $(Q)xsltproc --nonet --output $(BASEDIR)/index.html \ 74 $(PWD)/stylesheets/top-index.xsl $(PWD)/index.xml 75 @$(MAKE) --no-print-directory tidy-f TIDY_FILE=$(BASEDIR)/index.html 59 76 60 ARCHS_VD_XML := $(ARCHS:%=%-validate_dump-xml) 77 61 78 .PHONY: $(ARCHS_VD_XML) 62 79 $(ARCHS_VD_XML): override arch = $(@:%-validate_dump-xml=%) 63 $(ARCHS_VD_XML): 80 $(ARCHS_VD_XML): tmpdir 64 81 @echo "Validating $(arch) book..." 65 $(Q)mkdir -p $(VALIDATEDIR) 66 $(Q)xmllint --nonet --noent --xinclude \ 67 --relaxng $(TOP)/schema/docbook/4.5/rng/docbook.rng \ 68 -o $(VALIDATEDIR)/$(arch)-full.xml \ 69 $(PWD)/$(arch)-index.xml 82 $(Q)xmllint --nonet --noent --xinclude --postvalid \ 83 -o $(RENDERTMP)/$(arch)-full.xml $(PWD)/$(arch)-index.xml 70 84 71 ARCHS_P_XML := $(ARCHS:%=%-profiled-xml)72 85 .PHONY: $(ARCHS_P_XML) 73 86 $(ARCHS_P_XML): override arch = $(@:%-profiled-xml=%) 74 $(ARCHS_P_XML): 87 $(ARCHS_P_XML): tmpdir 75 88 @$(MAKE) --no-print-directory $(arch)-validate_dump-xml 76 @echo "Generating profiled $(arch) book..." 77 $(Q)mkdir -p $(PROFILEDIR)89 90 @echo "Generating profiled $(arch) book for XHTML..." 78 91 $(Q)xsltproc --nonet --stringparam profile.condition html \ 79 --output $(PROFILEDIR)/$(arch)-html.xml \ 80 $(PWD)/stylesheets/lfs-xsl/profile.xsl \ 81 $(VALIDATEDIR)/$(arch)-full.xml 92 --output $(RENDERTMP)/$(arch)-html.xml \ 93 $(PWD)/stylesheets/lfs-xsl/profile.xsl $(RENDERTMP)/$(arch)-full.xml 82 94 83 ARCHS_HTML := $(ARCHS:%=%-html) 84 .PHONY: html render $(ARCHS_HTML) 85 html render: $(ARCHS_HTML) titlepage 95 .PHONY: $(ARCHS_HTML) 86 96 $(ARCHS_HTML): override arch = $(@:%-html=%) 87 $(ARCHS_HTML): 97 $(ARCHS_HTML): tmpdir 88 98 @$(MAKE) --no-print-directory $(arch)-profiled-xml 89 99 90 100 @echo "Rendering chunked XHTML of $(arch)..." 91 $(Q)mkdir -p $( HTMLDIR)/$(arch)101 $(Q)mkdir -p $(BASEDIR)/$(arch) 92 102 $(Q)xsltproc --nonet -stringparam chunk.quietly $(CHUNK_QUIET) \ 93 103 -stringparam rootid "$(ROOT_ID)" \ 94 -stringparam base.dir $(HTMLDIR)/$(arch)/ \ 95 $(PWD)/stylesheets/clfs-chunked.xsl \ 96 $(PROFILEDIR)/$(arch)-html.xml 104 -stringparam base.dir $(BASEDIR)/$(arch)/ \ 105 $(PWD)/stylesheets/clfs-chunked.xsl $(RENDERTMP)/$(arch)-html.xml 97 106 98 107 @echo "Copying CSS code and images for $(arch)..." 99 $(Q)mkdir -p $( HTMLDIR)/$(arch)/stylesheets100 $(Q)cp $(PWD)/stylesheets/lfs-xsl/*.css $( HTMLDIR)/$(arch)/stylesheets101 $(Q)sed -i -e "s@../stylesheets@stylesheets@g" $( HTMLDIR)/$(arch)/*.html102 $(Q)mkdir -p $( HTMLDIR)/$(arch)/images103 $(Q)cp $(PWD)/images/*.png $( HTMLDIR)/$(arch)/images104 $(Q)sed -i -e "s@../images@images@g" $( HTMLDIR)/$(arch)/*.html108 $(Q)mkdir -p $(BASEDIR)/$(arch)/stylesheets 109 $(Q)cp $(PWD)/stylesheets/lfs-xsl/*.css $(BASEDIR)/$(arch)/stylesheets 110 $(Q)sed -i -e "s@../stylesheets@stylesheets@g" $(BASEDIR)/$(arch)/*.html 111 $(Q)mkdir -p $(BASEDIR)/$(arch)/images 112 $(Q)cp $(PWD)/images/*.png $(BASEDIR)/$(arch)/images 113 $(Q)sed -i -e "s@../images@images@g" $(BASEDIR)/$(arch)/*.html 105 114 106 @$(MAKE) --no-print-directory tidy-d TIDY_DIR=$( HTMLDIR)/$(arch)115 @$(MAKE) --no-print-directory tidy-d TIDY_DIR=$(BASEDIR)/$(arch) 107 116 108 ARCHS_NOCHUNKS := $(ARCHS:%=%-nochunks) 109 .PHONY: nochunks $(ARCHS_NOCHUNKS) 110 nochunks: $(ARCHS_NOCHUNKS) 117 .PHONY: $(ARCHS_NOCHUNKS) 111 118 $(ARCHS_NOCHUNKS): override arch = $(@:%-nochunks=%) 112 $(ARCHS_NOCHUNKS): 119 $(ARCHS_NOCHUNKS): tmpdir 113 120 @$(MAKE) --no-print-directory $(arch)-profiled-xml 114 121 115 122 @echo "Rendering Single File HTML of $(arch)..." 116 $(Q)mkdir -p $( NOCHUNKDIR)123 $(Q)mkdir -p $(BASEDIR) 117 124 $(Q)xsltproc --nonet -stringparam rootid "$(ROOT_ID)" \ 118 --output $(NOCHUNKDIR)/CLFS-$(arch).html \ 119 $(PWD)/stylesheets/clfs-nochunks.xsl \ 120 $(PROFILEDIR)/$(arch)-html.xml 125 --output $(BASEDIR)/CLFS-$(arch).html \ 126 $(PWD)/stylesheets/clfs-nochunks.xsl $(RENDERTMP)/$(arch)-html.xml 121 127 122 @$(MAKE) --no-print-directory tidy-f TIDY_FILE=$( NOCHUNKDIR)/CLFS-$(arch).html128 @$(MAKE) --no-print-directory tidy-f TIDY_FILE=$(BASEDIR)/CLFS-$(arch).html 123 129 124 ARCHS_FO := $(ARCHS:%=%-fo) 125 .PHONY: fo $(ARCHS_FO) 126 fo: $(ARCHS_FO) 127 $(ARCHS_FO): override arch = $(@:%-fo=%) 128 $(ARCHS_FO): 130 .PHONY: $(ARCHS_PDF) 131 $(ARCHS_PDF): override arch = $(@:%-pdf=%) 132 $(ARCHS_PDF): tmpdir 129 133 @$(MAKE) --no-print-directory $(arch)-profiled-xml 130 134 131 135 @echo "Generating FO file of $(arch)..." 132 @mkdir -p $(FODIR)133 136 $(Q)xsltproc --nonet -stringparam rootid "$(ROOT_ID)" \ 134 --output $(FODIR)/$(arch).fo \ 135 $(PWD)/stylesheets/clfs-pdf.xsl \ 136 $(PROFILEDIR)/$(arch)-html.xml 137 $(Q)sed -i -e 's/span="inherit"/span="all"/' $(FODIR)/$(arch).fo 138 139 ARCHS_PDF := $(ARCHS:%=%-pdf) 140 .PHONY: pdf $(ARCHS_PDF) 141 pdf: $(ARCHS_PDF) 142 $(ARCHS_PDF): override arch = $(@:%-pdf=%) 143 $(ARCHS_PDF): 144 @$(MAKE) --no-print-directory $(arch)-fo 137 --output $(RENDERTMP)/$(arch).fo $(PWD)/stylesheets/clfs-pdf.xsl \ 138 $(RENDERTMP)/$(arch)-html.xml 139 $(Q)sed -i -e 's/span="inherit"/span="all"/' $(RENDERTMP)/$(arch).fo 145 140 146 141 @echo "Rendering PDF of $(arch)..." 147 $(Q)mkdir -p $( PDFDIR)148 $(Q)fop $( FODIR)/$(arch).fo $(PDFDIR)/CLFS-$(arch).pdf142 $(Q)mkdir -p $(BASEDIR) 143 $(Q)fop $(RENDERTMP)/$(arch).fo $(BASEDIR)/CLFS-$(arch).pdf 149 144 150 ARCHS_VALIDATE := $(ARCHS:%=%-validate) 151 .PHONY: validate $(ARCHS_VALIDATE) 152 validate: $(ARCHS_VALIDATE) 145 .PHONY: $(ARCHS_VALIDATE) 153 146 $(ARCHS_VALIDATE): override arch = $(@:%-validate=%) 154 147 $(ARCHS_VALIDATE): 155 148 @echo "Validating $(arch)..." 156 $(Q)xmllint --xinclude --noout --nonet \ 157 --relaxng $(TOP)/schema/docbook/4.5/rng/docbook.rng \ 158 $(PWD)/$(arch)-index.xml 149 $(Q)xmllint --xinclude --noout --nonet --postvalid $(PWD)/$(arch)-index.xml 159 150 160 ARCHS_TROUBLE := $(ARCHS:%=%-trouble) 161 .PHONY: trouble $(ARCHS_TROUBLE) 162 trouble: $(ARCHS_TROUBLE) 163 $(ARCHS_TROUBLE): override arch = $(@:%-trouble=%) 164 $(ARCHS_TROUBLE): 165 @echo "Troubleshooting $(arch)..." 166 @mkdir -p $(TROUBLEDIR) 167 $(Q)xmllint --xinclude --nonet \ 168 --relaxng $(TOP)/schema/docbook/4.5/rng/docbook.rng \ 169 -o $(TROUBLEDIR)/dump-$(arch) \ 170 $(PWD)/$(arch)-index.xml 171 $(Q)xmllint --xinclude --noout --nonet \ 172 --relaxng $(TOP)/schema/docbook/4.5/rng/docbook.rng \ 173 $(TROUBLEDIR)/dump-$(arch) 174 @echo "You can now look at $(TROUBLEDIR)/dump-$(arch) to see the errors" 151 .PHONY: $(ARCHS_TROUBLE) 152 $(ARCHS_TROUBLE): override trouble_arch = $(@:%-trouble=%) 153 $(ARCHS_TROUBLE): tmpdir 154 @echo "Troubleshooting $(trouble_arch)..." 155 $(Q)xmllint --xinclude --nonet --postvalid \ 156 -o $(RENDERTMP)/dump-$(arch) $(PWD)/$(arch)-index.xml 157 $(Q)xmllint --xinclude --noout --nonet --valid $(RENDERTMP)/dump-$(arch) 158 @echo "You can now look at $(RENDERTMP)/dump-$(arch) to see the errors" 175 159 176 ARCHS_DUMP := $(ARCHS:%=%-dump) 177 .PHONY: dump-commands $(ARCHS_DUMP) 178 dump-commands: $(ARCHS_DUMP) 179 $(ARCHS_DUMP): override arch = $(@:%-dump=%) 160 .PHONY: $(ARCHS_DUMP) 161 $(ARCHS_DUMP): override arch = $(@:%-dump=%) 180 162 $(ARCHS_DUMP): 181 163 @echo "Extracting commands from $(arch)..." 182 164 $(Q)mkdir -p $(DUMPDIR)/$(arch) 183 $(Q)xsltproc --xinclude --nonet \ 184 --output $(DUMPDIR)/$(arch)/ \ 185 $(PWD)/stylesheets/dump-commands.xsl \ 186 $(PWD)/$(arch)-index.xml 165 $(Q)xsltproc --xinclude --nonet --output $(DUMPDIR)/$(arch)/ \ 166 $(PWD)/stylesheets/dump-commands.xsl $(PWD)/$(arch)-index.xml 187 167 188 ARCHS_DLLIST := $(ARCHS:%=%-dllist) 189 .PHONY: download-list $(ARCHS_DLLIST) 190 download-list: $(ARCHS_DLLIST) 168 .PHONY: $(ARCHS_DLLIST) 191 169 $(ARCHS_DLLIST): override arch = $(@:%-dllist=%) 192 170 $(ARCHS_DLLIST): 193 171 @echo "Creating download list for $(arch)..." 194 172 $(Q)mkdir -p $(DLLISTDIR) 195 $(Q)xsltproc --xinclude --nonet \ 196 --output $(DLLISTDIR)/$(arch).list \ 197 $(PWD)/stylesheets/wget.xsl \ 198 $(PWD)/$(arch)-index.xml 173 $(Q)xsltproc --xinclude --nonet --output $(DLLISTDIR)/$(arch)/dl.list \ 174 $(PWD)/stylesheets/wget.xsl $(PWD)/$(arch)-index.xml 199 175 200 FG_GREEN := $(shell echo -e '\e[0;32m')201 FG_BLUE := $(shell echo -e '\e[0;34m')202 FG_DEFAULT := $(shell echo -e '\e[0;0m')203 176 help: 204 @echo "Output: $( RENDERDIR)"177 @echo "Output: $(WORKDIR)" 205 178 @echo 206 179 @echo "HTML Targets" 207 @echo " $(FG_GREEN)clfs lfs tidy htmlrender titlepage $(FG_BLUE)$(ARCHS_HTML)$(FG_DEFAULT)"180 @echo " $(FG_GREEN)clfs lfs tidy render titlepage $(FG_BLUE)$(ARCHS_HTML)$(FG_DEFAULT)" 208 181 @echo 209 182 @echo "NoChunks Targets" 210 183 @echo " $(FG_GREEN)nochunks tidy $(FG_BLUE)$(ARCHS_NOCHUNKS)$(FG_DEFAULT)" 211 @echo212 @echo "FO Targets"213 @echo " $(FG_GREEN)fo $(FG_BLUE)$(ARCHS_FO)$(FG_DEFAULT)"214 184 @echo 215 185 @echo "PDF Targets"
Note: See TracChangeset
for help on using the changeset viewer.