hgbook

view it/Makefile @ 767:9cf5dbc6a9d7

Literal translation of Ch.14.
author Giulio@puck
date Mon Jul 27 22:08:15 2009 +0200 (2009-07-27)
parents 68c4d16d2bf4
children 124179faec5f
line source
1 include Makefile.vars
3 # Makefile.vars include the following system-dependent variables:
4 #
5 # dtd-url = the location of the DocBook 4.5 DTD on your filesystem
6 # system-xsl-dir = the location of DocBook XSLT on your filesystem
7 # python = the location of Python 3.x on your filesystem
9 xml-src-files := \
10 00book.xml \
11 $(wildcard ch*.xml)
12 #$(wildcard app*.xml)
14 xsltproc-opts := --nonet --xinclude
15 xmllint-opts := --noout --nonet --valid --path '$(dtd-url)'
17 obj-web := html
18 figs-web := ${obj-web}/figs
19 script-web := $(obj-web)/javascript
20 web-global := ../web
21 web-local := web
23 html: ${obj-web}/index.html ${web-local}/index-read.html.in
25 #$(obj-web)/index.html: ../stylesheets/system-xsl .validated-00book.xml #../web/index-read.html.in
26 $(obj-web)/index.html: .validated-00book.xml
27 xsltproc $(xsltproc-opts) -o $(obj-web)/x ../stylesheets/it/web.xsl 00book.xml
28 # xsltproc $(xsltproc-opts) -o $(obj-web)/x ../stylesheets/chunk-stylesheet.xsl 00book.xml
29 cp ${web-global}/styles.css ${obj-web}
30 mkdir -p ${figs-web}
31 cp -f ${web-global}/icons/*.png $(figs-web)
32 cp -f examples/figs/*.png $(figs-web)
33 mkdir -p $(script-web)
34 cp -f $(web-local)/*.js $(script-web)
35 sed -i -e "s|/support/||g" ${obj-web}/*.html
36 # python ../web/texpand.py ../web/index-read.html.in html/read/index.html
37 # for i in $(obj-web-read)/*.html; do \
38 # gzip -9 -c $$i > $$i.gz; \
39 # done
41 #../stylesheets/system-xsl: $(system-xsl-dir)
42 # ln -s $< $@
44 $(web-local)/index-read.html.in: $(web-local)/genindex.py $(xml-src-files)
45 cp $(web-local)/index-template.html $(obj-web)/index.html
46 sed -i -e "s|{% block bodycontent %}{% endblock %}|$(shell cat $(web-local)/index-read.html.in)|g" ${obj-web}/index.html
48 $(web-local)/genindex.py: $(xml-src-files)
49 cd $(web-local) && $(python) genindex.py
51 valid: .validated-00book.xml
53 .validated-00book.xml: $(xml-src-files) #examples/.run
54 xmllint $(xmllint-opts) $<
55 touch $@
57 clean:
58 rm -f $(web-local)/index-read.html.in
59 rm -rf $(obj-web)