comparison doc/Makefile @ 13054:25200c7efe0f

runrst: add RSTARGS Makefile variable to allow customization In particular, we can ask users to run make RSTARGS='--traceback' doc when we need debugging information
author Nicolas Dumazet <nicdumz.commits@gmail.com>
date Wed, 01 Dec 2010 09:46:11 +0900
parents 6b6e7da9bccd
children 323c11dad9c6
comparison
equal deleted inserted replaced
13051:120eccaaa522 13054:25200c7efe0f
5 ../mercurial/help/*.txt ../hgext/*.py ../hgext/*/__init__.py 5 ../mercurial/help/*.txt ../hgext/*.py ../hgext/*/__init__.py
6 PREFIX=/usr/local 6 PREFIX=/usr/local
7 MANDIR=$(PREFIX)/share/man 7 MANDIR=$(PREFIX)/share/man
8 INSTALL=install -c -m 644 8 INSTALL=install -c -m 644
9 PYTHON=python 9 PYTHON=python
10 RSTARGS=
10 11
11 export LANGUAGE=C 12 export LANGUAGE=C
12 export LC_ALL=C 13 export LC_ALL=C
13 14
14 all: man html 15 all: man html
23 hg.1.gendoc.txt: $(GENDOC) 24 hg.1.gendoc.txt: $(GENDOC)
24 ${PYTHON} gendoc.py > $@.tmp 25 ${PYTHON} gendoc.py > $@.tmp
25 mv $@.tmp $@ 26 mv $@.tmp $@
26 27
27 %: %.txt common.txt 28 %: %.txt common.txt
28 $(PYTHON) runrst hgmanpage --halt warning \ 29 $(PYTHON) runrst hgmanpage $(RSTARGS) --halt warning \
29 --strip-elements-with-class htmlonly $*.txt $* 30 --strip-elements-with-class htmlonly $*.txt $*
30 31
31 %.html: %.txt common.txt 32 %.html: %.txt common.txt
32 $(PYTHON) runrst html --halt warning \ 33 $(PYTHON) runrst html $(RSTARGS) --halt warning \
33 --link-stylesheet --stylesheet-path style.css $*.txt $*.html 34 --link-stylesheet --stylesheet-path style.css $*.txt $*.html
34 35
35 MANIFEST: man html 36 MANIFEST: man html
36 # tracked files are already in the main MANIFEST 37 # tracked files are already in the main MANIFEST
37 $(RM) $@ 38 $(RM) $@