hgbook
diff it/Makefile @ 976:713f0f69029a
merge with Italian, and very (few) work on ch03
author | Romain PELISSE <belaran@gmail.com> |
---|---|
date | Fri Sep 04 16:33:35 2009 +0200 (2009-09-04) |
parents | |
children | 719b03ea27c8 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/it/Makefile Fri Sep 04 16:33:35 2009 +0200 1.3 @@ -0,0 +1,92 @@ 1.4 +include Makefile.vars 1.5 + 1.6 +# Makefile.vars includes the following system-dependent variables: 1.7 +# 1.8 +# dtd-url = the location of the DocBook 4.5 DTD on your filesystem 1.9 +# system-xsl-dir = the location of DocBook XSLT on your filesystem 1.10 +# dynamic-link-command = the command to link the DocBook XSLT to our styles 1.11 +# python = the location of Python 3.x on your filesystem 1.12 + 1.13 +xml-src-files := \ 1.14 + 00book.xml \ 1.15 + $(wildcard ch*.xml) \ 1.16 + $(wildcard app*.xml) \ 1.17 + bibliography.xml 1.18 + 1.19 +xsltproc-opts := --nonet --xinclude 1.20 +xmllint-opts := --noout --nonet --valid --path '$(dtd-url)' 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 figs 1.31 + 1.32 +$(obj-web)/index.html: ../stylesheets/system-xsl .validated-00book.xml 1.33 + xsltproc $(xsltproc-opts) -o $(obj-web)/x ../stylesheets/it/web.xsl 00book.xml 1.34 + mkdir -p $(support-web) 1.35 + cp -f $(web-global)/icons/*.png $(support-web) 1.36 + cp $(web-global)/styles.css $(support-web) 1.37 + sed -i -e "s|figs/||g" $(support-web)/styles.css 1.38 + mkdir -p $(figs-web-folder) 1.39 + mkdir -p $(script-web) 1.40 + cp -f $(web-local)/*.js $(script-web) 1.41 + 1.42 +../stylesheets/system-xsl: $(system-xsl-dir) 1.43 + $(dynamic-link-command) 1.44 + 1.45 +$(web-local)/index-read.html.in: $(web-local)/genindex.py $(xml-src-files) 1.46 + cp $(web-local)/index-template.html $(obj-web)/index.html 1.47 + sed -i -e "s|{% block bodycontent %}{% endblock %}|$(shell cat $(web-local)/index-read.html.in)|g" $(obj-web)/index.html 1.48 + sed -i -e "s|/support/|../support/|g" $(obj-web)/*.html 1.49 + cp $(web-local)/index-template.html $(root-web)/index.html 1.50 + sed -i "s|{% block bodycontent %}{% endblock %}|$(shell cat $(web-local)/index-home.html.in)|g" $(root-web)/index.html 1.51 + sed -i -e "s|/support/|support/|g" $(root-web)/index.html 1.52 + 1.53 +$(web-local)/genindex.py: $(xml-src-files) 1.54 + cd $(web-local) && $(python) genindex.py 1.55 + 1.56 +valid: .validated-00book.xml 1.57 + 1.58 +.validated-00book.xml: $(xml-src-files) 1.59 + xmllint $(xmllint-opts) $< 1.60 + touch $@ 1.61 + 1.62 +clean: 1.63 + rm -f $(web-local)/index-read.html.in 1.64 + rm -f .validated-00book.xml 1.65 + rm -rf $(root-web) 1.66 + 1.67 +image-folder := figs 1.68 +# graphs, figures, screenshots 1.69 +image-files := $(wildcard $(image-folder)/*.dot $(image-folder)/*.svg $(image-folder)/*.png) 1.70 +# graphs 1.71 +image-dot := $(filter %.dot, $(image-files)) 1.72 +# figures 1.73 +image-svg := $(filter %.svg, $(image-files)) 1.74 +# screenshots 1.75 +image-png := $(filter %.png, $(image-files)) 1.76 + 1.77 +figs-web := \ 1.78 + $(image-dot:$(image-folder)/%.dot=$(figs-web-folder)/%.png) \ 1.79 + $(image-svg:$(image-folder)/%.svg=$(figs-web-folder)/%.png) \ 1.80 + $(image-png:$(image-folder)/%.png=$(figs-web-folder)/%.png) 1.81 + 1.82 +figs: $(figs-web) 1.83 + 1.84 +$(figs-web-folder)/%.png: $(image-folder)/%.svg 1.85 + inkscape -D -d 120 -e $@ $< 1.86 + 1.87 +$(figs-web-folder)/%.png: $(figs-web-folder)/%.svg 1.88 + inkscape -D -e $@ $< 1.89 + rm $< 1.90 + 1.91 +$(figs-web-folder)/%.png: $(image-folder)/%.png 1.92 + cp $< $@ 1.93 + 1.94 +$(figs-web-folder)/%.svg: $(image-folder)/%.dot 1.95 + dot -Tsvg -o $@ $<