hgbook
diff it/Makefile @ 1063:1cd77eb65a20
1.8 5th para zh translated
author | Zhaoping Sun <zhaopingsun@gmail.com> |
---|---|
date | Wed Nov 11 15:21:46 2009 -0500 (2009-11-11) |
parents | 793e15b562ef |
children | 719b03ea27c8 |
line diff
1.1 --- a/it/Makefile Sat Aug 22 16:35:17 2009 +0200 1.2 +++ b/it/Makefile Wed Nov 11 15:21:46 2009 -0500 1.3 @@ -1,9 +1,10 @@ 1.4 include Makefile.vars 1.5 1.6 -# Makefile.vars include the following system-dependent variables: 1.7 +# Makefile.vars includes the following system-dependent variables: 1.8 # 1.9 # dtd-url = the location of the DocBook 4.5 DTD on your filesystem 1.10 # system-xsl-dir = the location of DocBook XSLT on your filesystem 1.11 +# dynamic-link-command = the command to link the DocBook XSLT to our styles 1.12 # python = the location of Python 3.x on your filesystem 1.13 1.14 xml-src-files := \ 1.15 @@ -14,50 +15,51 @@ 1.16 1.17 xsltproc-opts := --nonet --xinclude 1.18 xmllint-opts := --noout --nonet --valid --path '$(dtd-url)' 1.19 - 1.20 -obj-web := html 1.21 + 1.22 +root-web := html 1.23 +support-web := $(root-web)/support 1.24 +obj-web := $(root-web)/read 1.25 figs-web-folder := $(obj-web)/figs 1.26 script-web := $(obj-web)/javascript 1.27 web-global := ../web 1.28 web-local := web 1.29 1.30 -html: $(obj-web)/index.html $(web-local)/index-read.html.in 1.31 +html: $(obj-web)/index.html $(web-local)/index-read.html.in figs 1.32 1.33 -#$(obj-web)/index.html: ../stylesheets/system-xsl .validated-00book.xml #../web/index-read.html.in 1.34 -$(obj-web)/index.html: .validated-00book.xml 1.35 +$(obj-web)/index.html: ../stylesheets/system-xsl .validated-00book.xml 1.36 xsltproc $(xsltproc-opts) -o $(obj-web)/x ../stylesheets/it/web.xsl 00book.xml 1.37 -# xsltproc $(xsltproc-opts) -o $(obj-web)/x ../stylesheets/chunk-stylesheet.xsl 00book.xml 1.38 - cp $(web-global)/styles.css $(obj-web) 1.39 + mkdir -p $(support-web) 1.40 + cp -f $(web-global)/icons/*.png $(support-web) 1.41 + cp $(web-global)/styles.css $(support-web) 1.42 + sed -i -e "s|figs/||g" $(support-web)/styles.css 1.43 mkdir -p $(figs-web-folder) 1.44 - cp -f $(web-global)/icons/*.png $(figs-web-folder) 1.45 - cp -f examples/figs/*.png $(figs-web-folder) 1.46 mkdir -p $(script-web) 1.47 cp -f $(web-local)/*.js $(script-web) 1.48 - sed -i -e "s|/support/||g" $(obj-web)/*.html 1.49 -# python ../web/texpand.py ../web/index-read.html.in html/read/index.html 1.50 -# for i in $(obj-web-read)/*.html; do \ 1.51 -# gzip -9 -c $$i > $$i.gz; \ 1.52 -# done 1.53 1.54 -#../stylesheets/system-xsl: $(system-xsl-dir) 1.55 -# ln -s $< $@ 1.56 +../stylesheets/system-xsl: $(system-xsl-dir) 1.57 + $(dynamic-link-command) 1.58 1.59 $(web-local)/index-read.html.in: $(web-local)/genindex.py $(xml-src-files) 1.60 cp $(web-local)/index-template.html $(obj-web)/index.html 1.61 - sed -i -e "s|{% block bodycontent %}{% endblock %}|$(shell cat $(web-local)/index-read.html.in)|g" ${obj-web}/index.html 1.62 + sed -i -e "s|{% block bodycontent %}{% endblock %}|$(shell cat $(web-local)/index-read.html.in)|g" $(obj-web)/index.html 1.63 + sed -i -e "s|/support/|../support/|g" $(obj-web)/*.html 1.64 + cp $(web-local)/index-template.html $(root-web)/index.html 1.65 + sed -i "s|{% block bodycontent %}{% endblock %}|$(shell cat $(web-local)/index-home.html.in)|g" $(root-web)/index.html 1.66 + sed -i -e "s|/support/|support/|g" $(root-web)/index.html 1.67 1.68 $(web-local)/genindex.py: $(xml-src-files) 1.69 cd $(web-local) && $(python) genindex.py 1.70 1.71 valid: .validated-00book.xml 1.72 1.73 -.validated-00book.xml: $(xml-src-files) #examples/.run 1.74 +.validated-00book.xml: $(xml-src-files) 1.75 xmllint $(xmllint-opts) $< 1.76 touch $@ 1.77 1.78 clean: 1.79 rm -f $(web-local)/index-read.html.in 1.80 - rm -rf $(obj-web) 1.81 + rm -f .validated-00book.xml 1.82 + rm -rf $(root-web) 1.83 1.84 image-folder := figs 1.85 # graphs, figures, screenshots 1.86 @@ -69,24 +71,22 @@ 1.87 # screenshots 1.88 image-png := $(filter %.png, $(image-files)) 1.89 1.90 -# this must already exists 1.91 -figs-folder := examples/figs 1.92 figs-web := \ 1.93 - $(image-dot:$(image-folder)/%.dot=$(figs-folder)/%.png) \ 1.94 - $(image-svg:$(image-folder)/%.svg=$(figs-folder)/%.png) \ 1.95 - $(image-png:$(image-folder)/%.png=$(figs-folder)/%.png) 1.96 + $(image-dot:$(image-folder)/%.dot=$(figs-web-folder)/%.png) \ 1.97 + $(image-svg:$(image-folder)/%.svg=$(figs-web-folder)/%.png) \ 1.98 + $(image-png:$(image-folder)/%.png=$(figs-web-folder)/%.png) 1.99 1.100 figs: $(figs-web) 1.101 1.102 -$(figs-folder)/%.png: $(image-folder)/%.svg 1.103 +$(figs-web-folder)/%.png: $(image-folder)/%.svg 1.104 inkscape -D -d 120 -e $@ $< 1.105 1.106 -$(figs-folder)/%.png: $(figs-folder)/%.svg 1.107 +$(figs-web-folder)/%.png: $(figs-web-folder)/%.svg 1.108 inkscape -D -e $@ $< 1.109 rm $< 1.110 1.111 -$(figs-folder)/%.png: $(image-folder)/%.png 1.112 +$(figs-web-folder)/%.png: $(image-folder)/%.png 1.113 cp $< $@ 1.114 1.115 -$(figs-folder)/%.svg: $(image-folder)/%.dot 1.116 +$(figs-web-folder)/%.svg: $(image-folder)/%.dot 1.117 dot -Tsvg -o $@ $<