Mercurial > hg
annotate doc/Makefile @ 7880:7ca2be800804
add debugcommands command: an easy to parse command + option index
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Mon, 23 Mar 2009 13:43:48 +0100 |
parents | fa584d23e3cc |
children | e0eb03bfa5af |
rev | line source |
---|---|
671
efa4a7e2f322
Move hgrc documentation out to its own man page, hgrc(5).
Bryan O'Sullivan <bos@serpentine.com>
parents:
465
diff
changeset
|
1 SOURCES=$(wildcard *.[0-9].txt) |
efa4a7e2f322
Move hgrc documentation out to its own man page, hgrc(5).
Bryan O'Sullivan <bos@serpentine.com>
parents:
465
diff
changeset
|
2 MAN=$(SOURCES:%.txt=%) |
efa4a7e2f322
Move hgrc documentation out to its own man page, hgrc(5).
Bryan O'Sullivan <bos@serpentine.com>
parents:
465
diff
changeset
|
3 HTML=$(SOURCES:%.txt=%.html) |
2233 | 4 PREFIX=/usr/local |
4030
a48971ae1387
install man pages by default into $(PREFIX)/share/man not $(PREFIX)/man since the FHS puts them there
Jonathan Smith <https://issues.rpath.com/>
parents:
3908
diff
changeset
|
5 MANDIR=$(PREFIX)/share/man |
7686
fa584d23e3cc
Do not install executable man pages
Christian Ebert <blacktrash@gmx.net>
parents:
7660
diff
changeset
|
6 INSTALL=install -c -m 644 |
6724
2e58f1a36046
use ${PYTHON} var in doc/Makefile as well
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6486
diff
changeset
|
7 PYTHON=python |
7660
ceed5f8c4ebf
Document how HTML documentation is built under Windows
Patrick Mezard <pmezard@gmail.com>
parents:
6943
diff
changeset
|
8 ASCIIDOC=asciidoc |
465 | 9 |
1006
b0e581438835
Generate html documentation by default, too.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
671
diff
changeset
|
10 all: man html |
465 | 11 |
12 man: $(MAN) | |
13 | |
14 html: $(HTML) | |
15 | |
1814
7956893e8458
generate hg manpage from commands.py docstring
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1689
diff
changeset
|
16 hg.1.txt: hg.1.gendoc.txt |
7956893e8458
generate hg manpage from commands.py docstring
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1689
diff
changeset
|
17 touch hg.1.txt |
7956893e8458
generate hg manpage from commands.py docstring
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1689
diff
changeset
|
18 |
3907
39dcee009aab
Regenerate hg.1 manpage if help text in help.py changes.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3872
diff
changeset
|
19 hg.1.gendoc.txt: ../mercurial/commands.py ../mercurial/help.py |
6724
2e58f1a36046
use ${PYTHON} var in doc/Makefile as well
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6486
diff
changeset
|
20 ${PYTHON} gendoc.py > $@ |
1814
7956893e8458
generate hg manpage from commands.py docstring
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1689
diff
changeset
|
21 |
671
efa4a7e2f322
Move hgrc documentation out to its own man page, hgrc(5).
Bryan O'Sullivan <bos@serpentine.com>
parents:
465
diff
changeset
|
22 %: %.xml |
6486
960bc707ea10
doc: escape .hg at bol in manpages with make (issue1072)
Christian Ebert <blacktrash@gmx.net>
parents:
4753
diff
changeset
|
23 xmlto man $*.xml ; \ |
960bc707ea10
doc: escape .hg at bol in manpages with make (issue1072)
Christian Ebert <blacktrash@gmx.net>
parents:
4753
diff
changeset
|
24 sed -e 's/^\.hg/\\\&.hg/' $* > $*~ ; \ |
960bc707ea10
doc: escape .hg at bol in manpages with make (issue1072)
Christian Ebert <blacktrash@gmx.net>
parents:
4753
diff
changeset
|
25 mv $*~ $* |
465 | 26 |
671
efa4a7e2f322
Move hgrc documentation out to its own man page, hgrc(5).
Bryan O'Sullivan <bos@serpentine.com>
parents:
465
diff
changeset
|
27 %.xml: %.txt |
7660
ceed5f8c4ebf
Document how HTML documentation is built under Windows
Patrick Mezard <pmezard@gmail.com>
parents:
6943
diff
changeset
|
28 $(ASCIIDOC) -d manpage -b docbook $*.txt |
465 | 29 |
671
efa4a7e2f322
Move hgrc documentation out to its own man page, hgrc(5).
Bryan O'Sullivan <bos@serpentine.com>
parents:
465
diff
changeset
|
30 %.html: %.txt |
7660
ceed5f8c4ebf
Document how HTML documentation is built under Windows
Patrick Mezard <pmezard@gmail.com>
parents:
6943
diff
changeset
|
31 $(ASCIIDOC) -b html4 $*.txt || $(ASCIIDOC) -b html $*.txt |
465 | 32 |
3872
9d7ac8613340
fix MANIFEST generation
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3269
diff
changeset
|
33 MANIFEST: man html |
6943
2ca70663ded3
doc/Makefile: rephrase comment (typo)
Christian Ebert <blacktrash@gmx.net>
parents:
6724
diff
changeset
|
34 # tracked files are already in the main MANIFEST |
3872
9d7ac8613340
fix MANIFEST generation
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3269
diff
changeset
|
35 $(RM) $@ |
3908
8020c35b6455
Include hg.1.gendoc.txt in doc/MANIFEST to prevent unnecessary rebuild.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3907
diff
changeset
|
36 for i in $(MAN) $(HTML) hg.1.gendoc.txt; do \ |
3872
9d7ac8613340
fix MANIFEST generation
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3269
diff
changeset
|
37 echo "doc/$$i" >> $@ ; \ |
9d7ac8613340
fix MANIFEST generation
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3269
diff
changeset
|
38 done |
9d7ac8613340
fix MANIFEST generation
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3269
diff
changeset
|
39 |
2233 | 40 install: man |
41 for i in $(MAN) ; do \ | |
3269
6901d3545021
Some versions of sed don't support .\+, so use ..* instead.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3245
diff
changeset
|
42 subdir=`echo $$i | sed -n 's/..*\.\([0-9]\)$$/man\1/p'` ; \ |
4753
620cea146b19
mercurial.spec: include CONTRIBUTORS, COPYING and man pages in rpm
Adam Spiers <hg@adamspiers.org>
parents:
4032
diff
changeset
|
43 mkdir -p $(DESTDIR)$(MANDIR)/$$subdir ; \ |
620cea146b19
mercurial.spec: include CONTRIBUTORS, COPYING and man pages in rpm
Adam Spiers <hg@adamspiers.org>
parents:
4032
diff
changeset
|
44 $(INSTALL) $$i $(DESTDIR)$(MANDIR)/$$subdir ; \ |
2233 | 45 done |
46 | |
465 | 47 clean: |
3872
9d7ac8613340
fix MANIFEST generation
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3269
diff
changeset
|
48 $(RM) $(MAN) $(MAN:%=%.xml) $(MAN:%=%.html) *.[0-9].gendoc.txt MANIFEST |