hgbook

diff it/Makefile @ 725:8d0085a1f5f7

Big & deep revision of Ch.1.
author Giulio@puck
date Sat Jun 13 22:55:34 2009 +0200 (2009-06-13)
parents 734111ce98ad
children 1819dd65d5f6
line diff
     1.1 --- a/it/Makefile	Mon Jun 08 02:06:58 2009 +0200
     1.2 +++ b/it/Makefile	Sat Jun 13 22:55:34 2009 +0200
     1.3 @@ -2,16 +2,24 @@
     1.4  
     1.5  xml-src-files := \
     1.6  	00book.xml \
     1.7 -	#app*.xml \
     1.8 -	ch*.xml
     1.9 +	$(wildcard ch*.xml)
    1.10 +	#$(wildcard app*.xml)
    1.11 +	
    1.12      
    1.13  obj-web := html
    1.14 +figs-web := ${obj-web}/figs
    1.15 +web-global := ../web
    1.16 +web-local := web
    1.17  
    1.18 -html: ${obj-web}/index.html
    1.19 +html: ${obj-web}/index.html ${web-local}/index-read.html.in
    1.20  
    1.21  #$(obj-web)/index.html: ../stylesheets/system-xsl .validated-00book.xml #../web/index-read.html.in
    1.22  $(obj-web)/index.html: .validated-00book.xml
    1.23  	xsltproc $(xsltproc-opts) -o $(obj-web)/x ../stylesheets/chunk-stylesheet.xsl 00book.xml
    1.24 +	cp ${web-global}/styles.css ${obj-web}
    1.25 +	mkdir -p ${figs-web}
    1.26 +	cp -f ${web-global}/icons/*.png $(figs-web)
    1.27 +	sed -i -e "s|/support/||g" ${obj-web}/*.html
    1.28  #	python ../web/texpand.py ../web/index-read.html.in html/read/index.html
    1.29  #	for i in $(obj-web-read)/*.html; do \
    1.30  #	  gzip -9 -c $$i > $$i.gz; \
    1.31 @@ -20,9 +28,19 @@
    1.32  #../stylesheets/system-xsl: $(system-xsl-dir)
    1.33  #	ln -s $< $@
    1.34  
    1.35 +$(web-local)/index-read.html.in: $(web-local)/genindex.py $(xml-src-files)
    1.36 +	cp $(web-local)/index-template.html $(obj-web)/index.html
    1.37 +	sed -i -e "s|{% block bodycontent %}{% endblock %}|$(shell cat $(web-local)/index-read.html.in)|g" ${obj-web}/index.html
    1.38 +
    1.39 +$(web-local)/genindex.py: $(xml-src-files)
    1.40 +	cd $(web-local) && ./genindex.py
    1.41 +
    1.42  valid: .validated-00book.xml
    1.43  
    1.44  .validated-00book.xml: $(xml-src-files) #examples/.run
    1.45  	xmllint $(xmllint-opts) $<
    1.46  	touch $@
    1.47  
    1.48 +clean:
    1.49 +	rm -f $(web-local)/index-read.html.in
    1.50 +	rm -rf $(obj-web)