##// END OF EJS Templates
doc/Makefile: docs now also depend on extensions...
Martin Geisler -
r12921:6b6e7da9 default
parent child Browse files
Show More
@@ -1,49 +1,50
1 1 SOURCES=$(wildcard *.[0-9].txt)
2 2 MAN=$(SOURCES:%.txt=%)
3 3 HTML=$(SOURCES:%.txt=%.html)
4 GENDOC=gendoc.py ../mercurial/commands.py ../mercurial/help.py ../mercurial/help/*.txt
4 GENDOC=gendoc.py ../mercurial/commands.py ../mercurial/help.py \
5 ../mercurial/help/*.txt ../hgext/*.py ../hgext/*/__init__.py
5 6 PREFIX=/usr/local
6 7 MANDIR=$(PREFIX)/share/man
7 8 INSTALL=install -c -m 644
8 9 PYTHON=python
9 10
10 11 export LANGUAGE=C
11 12 export LC_ALL=C
12 13
13 14 all: man html
14 15
15 16 man: $(MAN)
16 17
17 18 html: $(HTML)
18 19
19 20 hg.1.txt: hg.1.gendoc.txt
20 21 touch hg.1.txt
21 22
22 23 hg.1.gendoc.txt: $(GENDOC)
23 24 ${PYTHON} gendoc.py > $@.tmp
24 25 mv $@.tmp $@
25 26
26 27 %: %.txt common.txt
27 28 $(PYTHON) runrst hgmanpage --halt warning \
28 29 --strip-elements-with-class htmlonly $*.txt $*
29 30
30 31 %.html: %.txt common.txt
31 32 $(PYTHON) runrst html --halt warning \
32 33 --link-stylesheet --stylesheet-path style.css $*.txt $*.html
33 34
34 35 MANIFEST: man html
35 36 # tracked files are already in the main MANIFEST
36 37 $(RM) $@
37 38 for i in $(MAN) $(HTML); do \
38 39 echo "doc/$$i" >> $@ ; \
39 40 done
40 41
41 42 install: man
42 43 for i in $(MAN) ; do \
43 44 subdir=`echo $$i | sed -n 's/^.*\.\([0-9]\)$$/man\1/p'` ; \
44 45 mkdir -p $(DESTDIR)$(MANDIR)/$$subdir ; \
45 46 $(INSTALL) $$i $(DESTDIR)$(MANDIR)/$$subdir ; \
46 47 done
47 48
48 49 clean:
49 50 $(RM) $(MAN) $(HTML) hg.1.gendoc.txt MANIFEST
General Comments 0
You need to be logged in to leave comments. Login now