Changeset b47a4a1
- Timestamp:
- Feb 23, 2011, 2:47:10 AM (14 years ago)
- Branches:
- clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
- Children:
- 1f9faab, 879785b
- Parents:
- dabbced
- git-author:
- Joe Ciccone <jciccone@…> (02/23/11 01:36:44)
- git-committer:
- Joe Ciccone <jciccone@…> (02/23/11 02:47:10)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BOOK/Makefile
rdabbced rb47a4a1 10 10 ROOT_ID := 11 11 12 S := - 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') 13 15 14 ARCHS := x86 x86_64 x86_64-64 sparc sparc64 sparc64-64 mips mips64 mips64-64 \ 15 ppc ppc64 alpha 16 ARCHS := x86 x86_64 x86_64-64 \ 17 sparc sparc64 sparc64-64 \ 18 mips mips64 mips64-64 \ 19 ppc ppc64 \ 20 alpha 16 21 17 22 ARCHS_VD_XML := $(ARCHS:%=%-validate_dump-xml) 18 23 ARCHS_P_XML := $(ARCHS:%=%-profiled-xml) 19 24 20 ARCHS_HTML := $(ARCHS:%=% $(S)html)21 ARCHS_NOCHUNKS := $(ARCHS:%=% $(S)nochunks)22 ARCHS_PDF := $(ARCHS:%=% $(S)pdf)23 ARCHS_VALIDATE := $(ARCHS:%=% $(S)validate)24 ARCHS_TROUBLE := $(ARCHS:%=% $(S)trouble)25 ARCHS_DUMP := $(ARCHS:%=% $(S)dump)26 ARCHS_DLLIST := $(ARCHS:%=% $(S)dllist)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) 27 32 28 33 ifdef V … … 32 37 endif 33 38 34 .PHONY: clfs lfs tidy render titlepage nochunks pdf validate trouble dump-commands \ 35 download-list tmpdir $(ARCHS_HTML) $(ARCHS_NOCHUNKS) $(ARCHS_PDF) \ 36 $(ARCHS_VALIDATE) $(ARCHS_TROUBLE) $(ARCHS_DUMP) $(ARCHS_DLLIST) tmpdir 37 39 .PHONY: clfs lfs render nochunks pdf validate trouble dump-commands download-list 38 40 clfs lfs: tmpdir render 39 41 render: $(ARCHS_HTML) titlepage … … 45 47 download-list: $(ARCHS_DLLIST) 46 48 49 .PHONY: tmpdir 47 50 tmpdir: 48 $(Q) [ -d $(RENDERTMP) ] ||mkdir -p $(RENDERTMP)51 $(Q)mkdir -p $(RENDERTMP) 49 52 53 .PHONY: tidy tidy-f tidy-d 50 54 ifeq ($(shell which tidy >/dev/null 2>&1 && echo yes),yes) 51 55 tidy: … … 64 68 endif 65 69 70 .PHONY: titlepage 66 71 titlepage: 67 72 @echo "Rendering the top-level index..." … … 70 75 @$(MAKE) --no-print-directory tidy-f TIDY_FILE=$(BASEDIR)/index.html 71 76 72 $(ARCHS_VD_XML): override validate_dump_xml_arch = $(@:%-validate_dump-xml=%) 77 78 .PHONY: $(ARCHS_VD_XML) 79 $(ARCHS_VD_XML): override arch = $(@:%-validate_dump-xml=%) 73 80 $(ARCHS_VD_XML): tmpdir 74 @echo "Validating $( validate_dump_xml_arch) book..."81 @echo "Validating $(arch) book..." 75 82 $(Q)xmllint --nonet --noent --xinclude --postvalid \ 76 -o $(RENDERTMP)/$( validate_dump_xml_arch)-full.xml $(PWD)/$(validate_dump_xml_arch)-index.xml83 -o $(RENDERTMP)/$(arch)-full.xml $(PWD)/$(arch)-index.xml 77 84 78 $(ARCHS_P_XML): override profiled_xml_arch = $(@:%-profiled-xml=%) 85 .PHONY: $(ARCHS_P_XML) 86 $(ARCHS_P_XML): override arch = $(@:%-profiled-xml=%) 79 87 $(ARCHS_P_XML): tmpdir 80 @$(MAKE) --no-print-directory $( profiled_xml_arch)-validate_dump-xml88 @$(MAKE) --no-print-directory $(arch)-validate_dump-xml 81 89 82 @echo "Generating profiled $( profiled_xml_arch) book for XHTML..."90 @echo "Generating profiled $(arch) book for XHTML..." 83 91 $(Q)xsltproc --nonet --stringparam profile.condition html \ 84 --output $(RENDERTMP)/$( profiled_xml_arch)-html.xml \85 $(PWD)/stylesheets/lfs-xsl/profile.xsl $(RENDERTMP)/$( profiled_xml_arch)-full.xml92 --output $(RENDERTMP)/$(arch)-html.xml \ 93 $(PWD)/stylesheets/lfs-xsl/profile.xsl $(RENDERTMP)/$(arch)-full.xml 86 94 87 $(ARCHS_HTML): override html_arch = $(@:%$(S)html=%) 95 .PHONY: $(ARCHS_HTML) 96 $(ARCHS_HTML): override arch = $(@:%-html=%) 88 97 $(ARCHS_HTML): tmpdir 89 @$(MAKE) --no-print-directory $( html_arch)-profiled-xml98 @$(MAKE) --no-print-directory $(arch)-profiled-xml 90 99 91 @echo "Rendering chunked XHTML of $( html_arch)..."92 $(Q)mkdir -p $(BASEDIR)/$( html_arch)100 @echo "Rendering chunked XHTML of $(arch)..." 101 $(Q)mkdir -p $(BASEDIR)/$(arch) 93 102 $(Q)xsltproc --nonet -stringparam chunk.quietly $(CHUNK_QUIET) \ 94 103 -stringparam rootid "$(ROOT_ID)" \ 95 -stringparam base.dir $(BASEDIR)/$( html_arch)/ \96 $(PWD)/stylesheets/clfs-chunked.xsl $(RENDERTMP)/$( html_arch)-html.xml104 -stringparam base.dir $(BASEDIR)/$(arch)/ \ 105 $(PWD)/stylesheets/clfs-chunked.xsl $(RENDERTMP)/$(arch)-html.xml 97 106 98 @echo "Copying CSS code and images for $( html_arch)..."99 $(Q)mkdir -p $(BASEDIR)/$( html_arch)/stylesheets100 $(Q)cp $(PWD)/stylesheets/lfs-xsl/*.css $(BASEDIR)/$( html_arch)/stylesheets101 $(Q)sed -i -e "s@../stylesheets@stylesheets@g" $(BASEDIR)/$( html_arch)/*.html102 $(Q)mkdir -p $(BASEDIR)/$( html_arch)/images103 $(Q)cp $(PWD)/images/*.png $(BASEDIR)/$( html_arch)/images104 $(Q)sed -i -e "s@../images@images@g" $(BASEDIR)/$( html_arch)/*.html107 @echo "Copying CSS code and images for $(arch)..." 108 $(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=$(BASEDIR)/$( html_arch)115 @$(MAKE) --no-print-directory tidy-d TIDY_DIR=$(BASEDIR)/$(arch) 107 116 108 $(ARCHS_NOCHUNKS): override nochunk_arch = $(@:%$(S)nochunks=%) 117 .PHONY: $(ARCHS_NOCHUNKS) 118 $(ARCHS_NOCHUNKS): override arch = $(@:%-nochunks=%) 109 119 $(ARCHS_NOCHUNKS): tmpdir 110 @$(MAKE) --no-print-directory $( nochunk_arch)-profiled-xml120 @$(MAKE) --no-print-directory $(arch)-profiled-xml 111 121 112 @echo "Rendering Single File HTML of $( nochunk_arch)..."122 @echo "Rendering Single File HTML of $(arch)..." 113 123 $(Q)mkdir -p $(BASEDIR) 114 124 $(Q)xsltproc --nonet -stringparam rootid "$(ROOT_ID)" \ 115 --output $(BASEDIR)/CLFS-$( nochunk_arch).html \116 $(PWD)/stylesheets/clfs-nochunks.xsl $(RENDERTMP)/$( nochunk_arch)-html.xml125 --output $(BASEDIR)/CLFS-$(arch).html \ 126 $(PWD)/stylesheets/clfs-nochunks.xsl $(RENDERTMP)/$(arch)-html.xml 117 127 118 @$(MAKE) --no-print-directory tidy-f TIDY_FILE=$(BASEDIR)/CLFS-$( nochunk_arch).html128 @$(MAKE) --no-print-directory tidy-f TIDY_FILE=$(BASEDIR)/CLFS-$(arch).html 119 129 120 $(ARCHS_PDF): override pdf_arch = $(@:%$(S)pdf=%) 130 .PHONY: $(ARCHS_PDF) 131 $(ARCHS_PDF): override arch = $(@:%-pdf=%) 121 132 $(ARCHS_PDF): tmpdir 122 @$(MAKE) --no-print-directory $( pdf_arch)-profiled-xml133 @$(MAKE) --no-print-directory $(arch)-profiled-xml 123 134 124 @echo "Generating FO file of $( pdf_arch)..."135 @echo "Generating FO file of $(arch)..." 125 136 $(Q)xsltproc --nonet -stringparam rootid "$(ROOT_ID)" \ 126 --output $(RENDERTMP)/$( pdf_arch).fo $(PWD)/stylesheets/clfs-pdf.xsl \127 $(RENDERTMP)/$( pdf_arch)-html.xml128 $(Q)sed -i -e 's/span="inherit"/span="all"/' $(RENDERTMP)/$( pdf_arch).fo137 --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 129 140 130 @echo "Rendering PDF of $( pdf_arch)..."141 @echo "Rendering PDF of $(arch)..." 131 142 $(Q)mkdir -p $(BASEDIR) 132 $(Q)fop $(RENDERTMP)/$( pdf_arch).fo $(BASEDIR)/CLFS-$(pdf_arch).pdf143 $(Q)fop $(RENDERTMP)/$(arch).fo $(BASEDIR)/CLFS-$(arch).pdf 133 144 134 $(ARCHS_VALIDATE): override validate_arch = $(@:%$(S)validate=%) 145 .PHONY: $(ARCHS_VALIDATE) 146 $(ARCHS_VALIDATE): override arch = $(@:%-validate=%) 135 147 $(ARCHS_VALIDATE): 136 @echo "Validating $( validate_arch)..."137 $(Q)xmllint --xinclude --noout --nonet --postvalid $(PWD)/$( validate_arch)-index.xml148 @echo "Validating $(arch)..." 149 $(Q)xmllint --xinclude --noout --nonet --postvalid $(PWD)/$(arch)-index.xml 138 150 139 $(ARCHS_TROUBLE): override trouble_arch = $(@:%$(S)trouble=%) 151 .PHONY: $(ARCHS_TROUBLE) 152 $(ARCHS_TROUBLE): override trouble_arch = $(@:%-trouble=%) 140 153 $(ARCHS_TROUBLE): tmpdir 141 154 @echo "Troubleshooting $(trouble_arch)..." 142 155 $(Q)xmllint --xinclude --nonet --postvalid \ 143 -o $(RENDERTMP)/dump-$( trouble_arch) $(PWD)/$(trouble_arch)-index.xml144 $(Q)xmllint --xinclude --noout --nonet --valid $(RENDERTMP)/dump-$( trouble_arch)145 @echo "You can now look at $(RENDERTMP)/dump-$( trouble_arch) to see the errors"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" 146 159 147 $(ARCHS_DUMP): override dump_arch = $(@:%$(S)dump=%) 160 .PHONY: $(ARCHS_DUMP) 161 $(ARCHS_DUMP): override arch = $(@:%-dump=%) 148 162 $(ARCHS_DUMP): 149 @echo "Extracting commands from $( dump_arch)..."150 $(Q)mkdir -p $(DUMPDIR)/$( dump_arch)151 $(Q)xsltproc --xinclude --nonet --output $(DUMPDIR)/$( dump_arch)/ \152 $(PWD)/stylesheets/dump-commands.xsl $(PWD)/$( dump_arch)-index.xml163 @echo "Extracting commands from $(arch)..." 164 $(Q)mkdir -p $(DUMPDIR)/$(arch) 165 $(Q)xsltproc --xinclude --nonet --output $(DUMPDIR)/$(arch)/ \ 166 $(PWD)/stylesheets/dump-commands.xsl $(PWD)/$(arch)-index.xml 153 167 154 $(ARCHS_DLLIST): override dllist_arch = $(@:%$(S)dllist=%) 168 .PHONY: $(ARCHS_DLLIST) 169 $(ARCHS_DLLIST): override arch = $(@:%-dllist=%) 155 170 $(ARCHS_DLLIST): 156 @echo "Creating download list for $( dllist_arch)..."171 @echo "Creating download list for $(arch)..." 157 172 $(Q)mkdir -p $(DLLISTDIR) 158 $(Q)xsltproc --xinclude --nonet --output $(DLLISTDIR)/$( dllist_arch)/dl.list \159 $(PWD)/stylesheets/wget.xsl $(PWD)/$( dllist_arch)-index.xml173 $(Q)xsltproc --xinclude --nonet --output $(DLLISTDIR)/$(arch)/dl.list \ 174 $(PWD)/stylesheets/wget.xsl $(PWD)/$(arch)-index.xml 160 175 161 176 help: … … 163 178 @echo 164 179 @echo "HTML Targets" 165 @echo -e " \e[0;32mclfs lfs tidy render titlepage \e[0;34m$(ARCHS_HTML)\e[0;0m"180 @echo " $(FG_GREEN)clfs lfs tidy render titlepage $(FG_BLUE)$(ARCHS_HTML)$(FG_DEFAULT)" 166 181 @echo 167 182 @echo "NoChunks Targets" 168 @echo -e " \e[0;32mnochunks tidy \e[0;34m$(ARCHS_NOCHUNKS)\e[0;0m"183 @echo " $(FG_GREEN)nochunks tidy $(FG_BLUE)$(ARCHS_NOCHUNKS)$(FG_DEFAULT)" 169 184 @echo 170 185 @echo "PDF Targets" 171 @echo -e " \e[0;32mpdf \e[0;34m$(ARCHS_PDF)\e[0;0m"186 @echo " $(FG_GREEN)pdf $(FG_BLUE)$(ARCHS_PDF)$(FG_DEFAULT)" 172 187 @echo 173 188 @echo "Validate Targets" 174 @echo -e " \e[0;32mvalidate \e[0;34m$(ARCHS_VALIDATE)\e[0;0m"189 @echo " $(FG_GREEN)validate $(FG_BLUE)$(ARCHS_VALIDATE)$(FG_DEFAULT)" 175 190 @echo 176 191 @echo "Trouble Targets" 177 @echo -e " \e[0;32mtrouble \e[0;34m$(ARCHS_TROUBLE)\e[0;0m"192 @echo " $(FG_GREEN)trouble $(FG_BLUE)$(ARCHS_TROUBLE)$(FG_DEFAULT)" 178 193 @echo 179 194 @echo "Dump-Commands Targets" 180 @echo -e " \e[0;32mdump-commands \e[0;34m$(ARCHS_DUMP)\e[0;0m"195 @echo " $(FG_GREEN)dump-commands $(FG_BLUE)$(ARCHS_DUMP)$(FG_DEFAULT)" 181 196 @echo 182 197 @echo "Download-List Targets" 183 @echo -e " \e[0;32mdownload-list \e[0;34m$(ARCHS_DLLIST)\e[0;0m"198 @echo " $(FG_GREEN)download-list $(FG_BLUE)$(ARCHS_DLLIST)$(FG_DEFAULT)"
Note:
See TracChangeset
for help on using the changeset viewer.