comparison doc/Makefile @ 8311:e0eb03bfa5af

manpage build: fail early when xmlto is not available When we try to build manpages with xmlto and sed, but xmlto is missing fail at the xmlto stage. Otherwise, one may run `cd doc; make' and miss the warnings like: xmlto: not found sed: hg.1: No such file or directory and end up with empty files installed as manpages.
author Giorgos Keramidas <keramida@ceid.upatras.gr>
date Thu, 07 May 2009 15:08:25 +0300
parents fa584d23e3cc
children 1027da7d2fb9
comparison
equal deleted inserted replaced
8310:8417d82d3969 8311:e0eb03bfa5af
18 18
19 hg.1.gendoc.txt: ../mercurial/commands.py ../mercurial/help.py 19 hg.1.gendoc.txt: ../mercurial/commands.py ../mercurial/help.py
20 ${PYTHON} gendoc.py > $@ 20 ${PYTHON} gendoc.py > $@
21 21
22 %: %.xml 22 %: %.xml
23 xmlto man $*.xml ; \ 23 xmlto man $*.xml && \
24 sed -e 's/^\.hg/\\\&.hg/' $* > $*~ ; \ 24 sed -e 's/^\.hg/\\\&.hg/' $* > $*~ && \
25 mv $*~ $* 25 mv $*~ $*
26 26
27 %.xml: %.txt 27 %.xml: %.txt
28 $(ASCIIDOC) -d manpage -b docbook $*.txt 28 $(ASCIIDOC) -d manpage -b docbook $*.txt
29 29