hgbook

diff fr/Makefile @ 983:5e1e70fcdfdb

Corrected some errors.
- Indentation problems
- Syntax errors (missing </para>,...)
- French mistakes
author Frédéric Bouquet <youshe.jaalon@gmail.com>
date Tue Sep 08 23:42:42 2009 +0200 (2009-09-08)
parents 88828b784971 547d3aa25ef0
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/fr/Makefile	Tue Sep 08 23:42:42 2009 +0200
     1.3 @@ -0,0 +1,219 @@
     1.4 +# This makefile requires GNU make.
     1.5 +
     1.6 +image-sources := $(wildcard figs/*.dot figs/*.gif figs/*.png figs/*.svg)
     1.7 +
     1.8 +xml-src-files := \
     1.9 +	00book.xml \
    1.10 +	app*.xml \
    1.11 +	ch*.xml
    1.12 +
    1.13 +image-dot := $(filter %.dot,$(image-sources))
    1.14 +image-svg := $(filter %.svg,$(image-sources))
    1.15 +image-oth := $(filter %.gif %.png,$(image-sources))
    1.16 +
    1.17 +obj-web := html
    1.18 +obj-websup := $(obj-web)/support
    1.19 +obj-web-read := $(obj-web)/read
    1.20 +
    1.21 +image-web := \
    1.22 +	$(image-dot:%.dot=$(obj-web-read)/%.png) \
    1.23 +	$(image-svg:%.svg=$(obj-web-read)/%.png) \
    1.24 +	$(image-oth:%=$(obj-web-read)/%)
    1.25 +
    1.26 +example-sources-by-name := \
    1.27 +	backout \
    1.28 +	bisect \
    1.29 +	branching \
    1.30 +	branch-named \
    1.31 +	branch-repo \
    1.32 +	cmdref \
    1.33 +	daily.copy \
    1.34 +	daily.files \
    1.35 +	daily.rename \
    1.36 +	daily.revert \
    1.37 +	extdiff \
    1.38 +	filenames \
    1.39 +	hook.msglen \
    1.40 +	hook.simple \
    1.41 +	issue29 \
    1.42 +	mq.guards \
    1.43 +	mq.qinit-help \
    1.44 +	mq.dodiff \
    1.45 +	mq.id \
    1.46 +	mq.tarball \
    1.47 +	mq.tools \
    1.48 +	mq.tutorial \
    1.49 +	rename.divergent \
    1.50 +	rollback \
    1.51 +	tag \
    1.52 +	template.simple \
    1.53 +	template.svnstyle \
    1.54 +	tour \
    1.55 +	tour-merge-conflict
    1.56 +
    1.57 +example-sources := \
    1.58 +	$(example-sources-by-name:%=examples/%) \
    1.59 +	$(wildcard examples/ch*/*)
    1.60 +
    1.61 +extras-web-base := \
    1.62 +	$(obj-web)/index.html \
    1.63 +	$(obj-web)/robots.txt \
    1.64 +	$(obj-websup)/form-min.js \
    1.65 +	$(obj-websup)/form.js \
    1.66 +	$(obj-websup)/hsbook.js \
    1.67 +	$(obj-websup)/jquery-min.js \
    1.68 +	$(obj-websup)/jquery.js \
    1.69 +	$(obj-websup)/styles.css
    1.70 +
    1.71 +extras-web := $(extras-web-base) $(extras-web-base:%=%.gz)
    1.72 +
    1.73 +xsltproc := xsltproc
    1.74 +xsltproc-opts := --nonet --xinclude --path '$(xml-path)'
    1.75 +
    1.76 +xmllint := xmllint
    1.77 +xmllint-opts := --noout --nonet --valid
    1.78 +
    1.79 +system-xsl-dir := $(firstword $(wildcard \
    1.80 +	/usr/share/sgml/docbook/xsl-stylesheets \
    1.81 +	/usr/share/xml/docbook/stylesheet/nwalsh \
    1.82 +	))
    1.83 +
    1.84 +# Bletcherousness.
    1.85 +
    1.86 +ifneq ($(wildcard /usr/share/sgml/docbook/xml-dtd-4.4-*),)
    1.87 +dtd-dir := $(wildcard /usr/share/sgml/docbook/xml-dtd-4.4-*)
    1.88 +else
    1.89 +ifneq ($(wildcard /usr/share/xml/docbook/schema/dtd/4.4),)
    1.90 +dtd-dir := $(wildcard /usr/share/xml/docbook/schema/dtd/4.4)
    1.91 +else
    1.92 +$(error Do not know where to look for DocBook XML 4.4 DTD)
    1.93 +endif
    1.94 +endif
    1.95 +
    1.96 +ifeq ($(system-xsl-dir),)
    1.97 +$(error add a suitable directory to system-xsl-dir)
    1.98 +endif
    1.99 +
   1.100 +example-prereqs := \
   1.101 +	/usr/bin/merge
   1.102 +
   1.103 +dist-sources := \
   1.104 +	../html/hgicon.png \
   1.105 +	../html/index.html.var \
   1.106 +	../html/index.en.html
   1.107 +
   1.108 +hg = $(shell which hg)
   1.109 +
   1.110 +hg-id = $(shell hg parents --template '{node|short}, dated {date|isodate},\n')
   1.111 +
   1.112 +hg-version = $(shell hg version -q | \
   1.113 +		     sed 's,.*(version \(unknown\|[a-f0-9+]*\)),\1,')
   1.114 +
   1.115 +all: web complete.xml
   1.116 +
   1.117 +../stylesheets/system-xsl: $(system-xsl-dir)
   1.118 +	ln -s $< $@
   1.119 +
   1.120 +web: ../stylesheets/system-xsl websup html
   1.121 +
   1.122 +html: $(obj-web-read)/index.html
   1.123 +
   1.124 +../web/index-read.html.in: ../web/genindex.py $(xml-src-files)
   1.125 +	cd ../web && ./genindex.py
   1.126 +
   1.127 +$(obj-web-read)/index.html: ../stylesheets/system-xsl .validated-00book.xml ../web/index-read.html.in
   1.128 +	xsltproc $(xsltproc-opts) -o $(obj-web-read)/x ../stylesheets/chunk-stylesheet.xsl 00book.xml
   1.129 +	python ../web/texpand.py ../web/index-read.html.in html/read/index.html
   1.130 +	for i in $(obj-web-read)/*.html; do \
   1.131 +	  gzip -9 -c $$i > $$i.gz; \
   1.132 +	done
   1.133 +
   1.134 +websup: $(extras-web) $(image-web)
   1.135 +	mkdir -p $(obj-websup)/figs $(obj-web-read)/figs
   1.136 +	cp ../stylesheets/system-xsl/images/*.png $(obj-websup)/figs
   1.137 +	cp -f ../web/icons/*.png $(obj-websup)/figs
   1.138 +
   1.139 +complete.xml: .validated-00book.xml
   1.140 +	$(xsltproc) $(xsltproc-opts) -o $@ ../stylesheets/dtd-profile.xsl 00book.xml
   1.141 +
   1.142 +all-ids.dat: ../stylesheets/all-ids.xsl $(xml-src-files)
   1.143 +	$(xsltproc) $(xsltproc-opts) -o $@ ../stylesheets/all-ids.xsl 00book.xml
   1.144 +
   1.145 +web: websup
   1.146 +
   1.147 +valid: .validated-00book.xml
   1.148 +
   1.149 +.validated-00book.xml: $(xml-src-files) examples/.run
   1.150 +	$(xmllint) --path '$(dtd-dir):$(xml-path)' $(xmllint-opts) $<
   1.151 +	touch $@
   1.152 +
   1.153 +# Produce 90dpi PNGs for the web.
   1.154 +
   1.155 +$(obj-web-read)/figs/%.png: $(obj-web-read)/figs/%.svg fixsvg
   1.156 +	mkdir -p $(dir $@)
   1.157 +	./fixsvg $<
   1.158 +	inkscape -D -e $@ $<-tmp.svg
   1.159 +	rm $<-tmp.svg
   1.160 +
   1.161 +$(obj-web-read)/figs/%.png: figs/%.svg fixsvg
   1.162 +	mkdir -p $(dir $@)
   1.163 +	./fixsvg $<
   1.164 +	inkscape -D -e $@ $<-tmp.svg
   1.165 +	rm $<-tmp.svg
   1.166 +
   1.167 +$(obj-web-read)/figs/%.gif: figs/%.gif
   1.168 +	cp $< $@
   1.169 +
   1.170 +$(obj-web-read)/figs/%.png: figs/%.png
   1.171 +	cp $< $@
   1.172 +
   1.173 +$(obj-web-read)/figs/%.svg: figs/%.dot
   1.174 +	mkdir -p $(dir $@)
   1.175 +	dot -Tsvg -o $@ $<
   1.176 +
   1.177 +examples: $(example-prereqs) examples/.run
   1.178 +
   1.179 +examples/.run: $(example-sources)
   1.180 +	cd examples && ./run-example -a
   1.181 +
   1.182 +examples/%.run: examples/% examples/run-example
   1.183 +
   1.184 +clean:
   1.185 +	-rm -rf dist html $(image-dot:%.dot=%.pdf) $(image-dot:%.dot=%.png) \
   1.186 +	  $(image-svg:%.svg=%.png) examples/*.{lxo,run} examples/.run
   1.187 +
   1.188 +install: html $(dist-sources)
   1.189 +	rm -rf dist
   1.190 +	mkdir -p dist
   1.191 +	cp html/*.{css,html,png} dist
   1.192 +	cp $(dist-sources) dist
   1.193 +
   1.194 +rsync: install
   1.195 +	rsync -avz --delete dist sp.red-bean.com:public_html/hgbook
   1.196 +
   1.197 +vpath %.css ../web
   1.198 +vpath %.html.in ../web
   1.199 +vpath %.js ../web/javascript
   1.200 +
   1.201 +$(obj-websup)/%.css: %.css
   1.202 +	@mkdir -p $(dir $@)
   1.203 +	cp $< $@
   1.204 +
   1.205 +$(obj-websup)/%.jpg: %.jpg
   1.206 +	@mkdir -p $(dir $@)
   1.207 +	cp $< $@
   1.208 +
   1.209 +$(obj-websup)/%.js: %.js
   1.210 +	@mkdir -p $(dir $@)
   1.211 +	cp $< $@
   1.212 +
   1.213 +$(obj-web)/%: ../web/%
   1.214 +	@mkdir -p $(dir $@)
   1.215 +	cp $< $@
   1.216 +
   1.217 +$(obj-web)/%.html: %.html.in
   1.218 +	@mkdir -p $(dir $@)
   1.219 +	python ../web/texpand.py $< $@
   1.220 +
   1.221 +%.gz: %
   1.222 +	gzip -9 -c $< > $@