Changeset c695188 for BOOK/Makefile
- Timestamp:
- Jan 2, 2010, 12:57:36 AM (15 years ago)
- Branches:
- clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
- Children:
- 5bc27c8
- Parents:
- 16ca115
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BOOK/Makefile
r16ca115 rc695188 32 32 endif 33 33 34 .PHONY: lfs tidy render titlepage $(ARCHS_HTML) nochunks $(ARCHS_NOCHUNKS) pdf\35 $(ARCHS_PDF) validate $(ARCHS_VALIDATE) trouble $(ARCHS_TROUBLE) \36 dump-commands $(ARCHS_DUMP) download-list$(ARCHS_DLLIST) tmpdir34 .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 37 38 lfs: tmpdir render tidy 38 clfs lfs: tmpdir render 39 render: $(ARCHS_HTML) titlepage 40 nochunks: tmpdir $(ARCHS_NOCHUNKS) 41 pdf: tmpdir $(ARCHS_PDF) 42 validate: $(ARCHS_VALIDATE) 43 trouble: tmpdir $(ARCHS_TROUBLE) 44 dump-commands: $(ARCHS_DUMP) 45 download-list: $(ARCHS_DLLIST) 39 46 40 47 tmpdir: 41 @echo "Creating and cleaning $(RENDERTMP)"42 48 $(Q)[ -d $(RENDERTMP) ] || mkdir -p $(RENDERTMP) 43 $(Q)rm -f $(RENDERTMP)/*-{full,html,pdf}.xml44 $(Q)rm -f $(RENDERTMP)/*.fo45 49 46 50 ifeq ($(shell which tidy >/dev/null 2>&1 && echo yes),yes) 47 51 tidy: 48 @echo "Running tidy on the created HTML" 49 $(Q)for filename in `find $(BASEDIR) -name "*.html"`; do \ 50 tidy -config $(PWD)/tidy.conf $$filename; \ 51 true; \ 52 bash $(PWD)/obfuscate.sh $$filename; \ 53 sed -i -e "s@text/html@application/xhtml+xml@g" $$filename; \ 54 done; 52 @$(MAKE) --no-print-directory tidy-d TIDY_DIR=$(BASEDIR) 53 54 tidy-f: 55 @echo "Running tidy on F:$(shell basename $(TIDY_FILE))" 56 @$(TOP)/tidy.sh "$(TIDY_FILE)" 57 58 tidy-d: 59 @echo "Running tidy on D:$(shell basename $(TIDY_DIR))" 60 @$(TOP)/tidy.sh "$(TIDY_DIR)" 55 61 else 56 tidy :62 tidy tidy-f tidy-d: 57 63 @echo "Tidy is not installed on this system" 58 64 endif 59 65 60 render: $(ARCHS_HTML) titlepage61 62 66 titlepage: 67 @echo "Rendering the top-level index..." 63 68 $(Q)xsltproc --nonet --output $(BASEDIR)/index.html \ 64 69 $(PWD)/stylesheets/top-index.xsl $(PWD)/index.xml 70 @$(MAKE) --no-print-directory tidy-f TIDY_FILE=$(BASEDIR)/index.html 65 71 66 72 $(ARCHS_VD_XML): override validate_dump_xml_arch = $(@:%-validate_dump-xml=%) 67 $(ARCHS_VD_XML): 73 $(ARCHS_VD_XML): tmpdir 68 74 @echo "Validating $(validate_dump_xml_arch) book..." 69 75 $(Q)xmllint --nonet --noent --xinclude --postvalid \ … … 71 77 72 78 $(ARCHS_P_XML): override profiled_xml_arch = $(@:%-profiled-xml=%) 73 $(ARCHS_P_XML): 79 $(ARCHS_P_XML): tmpdir 74 80 @$(MAKE) --no-print-directory $(profiled_xml_arch)-validate_dump-xml 75 81 … … 80 86 81 87 $(ARCHS_HTML): override html_arch = $(@:%$(S)html=%) 82 $(ARCHS_HTML): 88 $(ARCHS_HTML): tmpdir 83 89 @$(MAKE) --no-print-directory $(html_arch)-profiled-xml 84 90 … … 90 96 $(PWD)/stylesheets/clfs-chunked.xsl $(RENDERTMP)/$(html_arch)-html.xml 91 97 92 @echo "Copying CSS code and images ..."98 @echo "Copying CSS code and images for $(html_arch)..." 93 99 $(Q)mkdir -p $(BASEDIR)/$(html_arch)/stylesheets 94 100 $(Q)cp $(PWD)/stylesheets/lfs-xsl/*.css $(BASEDIR)/$(html_arch)/stylesheets … … 98 104 $(Q)sed -i -e "s@../images@images@g" $(BASEDIR)/$(html_arch)/*.html 99 105 100 nochunks: tmpdir $(ARCHS_NOCHUNKS) tidy 106 @$(MAKE) --no-print-directory tidy-d TIDY_DIR=$(BASEDIR)/$(html_arch) 101 107 102 108 $(ARCHS_NOCHUNKS): override nochunk_arch = $(@:%$(S)nochunks=%) 103 $(ARCHS_NOCHUNKS): 109 $(ARCHS_NOCHUNKS): tmpdir 104 110 @$(MAKE) --no-print-directory $(nochunk_arch)-profiled-xml 105 111 … … 110 116 $(PWD)/stylesheets/clfs-nochunks.xsl $(RENDERTMP)/$(nochunk_arch)-html.xml 111 117 112 @echo "Running Tidy..." 113 $(Q)tidy -config $(PWD)/tidy.conf $(BASEDIR)/CLFS-$(nochunk_arch).html || true 114 @echo "Running obfuscate.sh..." 115 $(Q)bash $(PWD)/obfuscate.sh $(BASEDIR)/CLFS-$(nochunk_arch).html 116 $(Q)sed -i -e "s@text/html@application/xhtml+xml@g" \ 117 $(BASEDIR)/CLFS-$(nochunk_arch).html 118 119 pdf: tmpdir $(ARCHS_PDF) 118 @$(MAKE) --no-print-directory tidy-f TIDY_FILE=$(BASEDIR)/CLFS-$(nochunk_arch).html 120 119 121 120 $(ARCHS_PDF): override pdf_arch = $(@:%$(S)pdf=%) 122 $(ARCHS_PDF): 121 $(ARCHS_PDF): tmpdir 123 122 @$(MAKE) --no-print-directory $(pdf_arch)-profiled-xml 124 123 … … 133 132 $(Q)fop $(RENDERTMP)/$(pdf_arch).fo $(BASEDIR)/CLFS-$(pdf_arch).pdf 134 133 135 validate: $(ARCHS_VALIDATE)136 137 134 $(ARCHS_VALIDATE): override validate_arch = $(@:%$(S)validate=%) 138 135 $(ARCHS_VALIDATE): … … 140 137 $(Q)xmllint --xinclude --noout --nonet --postvalid $(PWD)/$(validate_arch)-index.xml 141 138 142 trouble: tmpdir $(ARCHS_TROUBLE)143 144 139 $(ARCHS_TROUBLE): override trouble_arch = $(@:%$(S)trouble=%) 145 $(ARCHS_TROUBLE): 140 $(ARCHS_TROUBLE): tmpdir 146 141 @echo "Troubleshooting $(trouble_arch)..." 147 142 $(Q)xmllint --xinclude --nonet --postvalid \ … … 149 144 $(Q)xmllint --xinclude --noout --nonet --valid $(RENDERTMP)/dump-$(trouble_arch) 150 145 @echo "You can now look at $(RENDERTMP)/dump-$(trouble_arch) to see the errors" 151 152 dump-commands: $(ARCHS_DUMP)153 146 154 147 $(ARCHS_DUMP): override dump_arch = $(@:%$(S)dump=%) … … 158 151 $(Q)xsltproc --xinclude --nonet --output $(DUMPDIR)/$(dump_arch)/ \ 159 152 $(PWD)/stylesheets/dump-commands.xsl $(PWD)/$(dump_arch)-index.xml 160 161 download-list: $(ARCHS_DLLIST)162 153 163 154 $(ARCHS_DLLIST): override dllist_arch = $(@:%$(S)dllist=%) … … 172 163 @echo 173 164 @echo "HTML Targets" 174 @echo -e " \e[0;32m lfs tidy render titlepage \e[0;34m$(ARCHS_HTML)\e[0;0m"165 @echo -e " \e[0;32mclfs lfs tidy render titlepage \e[0;34m$(ARCHS_HTML)\e[0;0m" 175 166 @echo 176 167 @echo "NoChunks Targets"
Note:
See TracChangeset
for help on using the changeset viewer.