Mercurial > hg
annotate doc/Makefile @ 11880:e3526634d5a3
url.py: removed 'file' inheritance in the httpsendfile class
Since py3k doesn't have a "file" builtin and, consequently, doesn't support
inheriting from it, this patch refactors the httpsendfile class to wrap the
objects returned by the builtin "open" function while adding the necessary
methods (__len__ for constructing the Content-Length header and read, write,
close and seek for the file-like interface).
author | Renato Cunha <renatoc@gmail.com> |
---|---|
date | Sat, 14 Aug 2010 18:31:22 -0300 |
parents | a0c5f531daab |
children | 99e8dd56e244 |
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) |
10001
3fb77d6cb9e5
doc: correct path to help files in Makefile
Christian Ebert <blacktrash@gmx.net>
parents:
9971
diff
changeset
|
4 GENDOC=gendoc.py ../mercurial/commands.py ../mercurial/help.py ../mercurial/help/*.txt |
2233 | 5 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
|
6 MANDIR=$(PREFIX)/share/man |
7686
fa584d23e3cc
Do not install executable man pages
Christian Ebert <blacktrash@gmx.net>
parents:
7660
diff
changeset
|
7 INSTALL=install -c -m 644 |
6724
2e58f1a36046
use ${PYTHON} var in doc/Makefile as well
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6486
diff
changeset
|
8 PYTHON=python |
465 | 9 |
10555
091dddf05764
doc/Makefile: fix doc generation when LANGUAGE is set
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
10093
diff
changeset
|
10 export LANGUAGE=C |
9971
fa99480d5135
doc/Makefile: ensure C locale
Martin Geisler <mg@lazybytes.net>
parents:
9703
diff
changeset
|
11 export LC_ALL=C |
fa99480d5135
doc/Makefile: ensure C locale
Martin Geisler <mg@lazybytes.net>
parents:
9703
diff
changeset
|
12 |
1006
b0e581438835
Generate html documentation by default, too.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
671
diff
changeset
|
13 all: man html |
465 | 14 |
15 man: $(MAN) | |
16 | |
17 html: $(HTML) | |
18 | |
1814
7956893e8458
generate hg manpage from commands.py docstring
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1689
diff
changeset
|
19 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
|
20 touch hg.1.txt |
7956893e8458
generate hg manpage from commands.py docstring
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1689
diff
changeset
|
21 |
9703
8374f26727de
doc/Makefile: add help/*.txt as a dependency
Martin Geisler <mg@lazybytes.net>
parents:
9626
diff
changeset
|
22 hg.1.gendoc.txt: $(GENDOC) |
9444
2f7f6e43d52b
doc/Makefile: do not create files in case of errors
Martin Geisler <mg@lazybytes.net>
parents:
9422
diff
changeset
|
23 ${PYTHON} gendoc.py > $@.tmp |
2f7f6e43d52b
doc/Makefile: do not create files in case of errors
Martin Geisler <mg@lazybytes.net>
parents:
9422
diff
changeset
|
24 mv $@.tmp $@ |
1814
7956893e8458
generate hg manpage from commands.py docstring
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1689
diff
changeset
|
25 |
9162
2399362b3bb0
doc: link man pages to one another
Martin Geisler <mg@lazybytes.net>
parents:
9161
diff
changeset
|
26 %: %.txt common.txt |
11639
a0c5f531daab
doc: make sure we use our own code for generating man pages
Mads Kiilerich <mads@kiilerich.com>
parents:
10971
diff
changeset
|
27 $(PYTHON) runrst hgmanpage --halt warning \ |
9445
f0105f2c424c
doc/Makefile: make rst2html and rst2man halt on warnings
Martin Geisler <mg@lazybytes.net>
parents:
9444
diff
changeset
|
28 --strip-elements-with-class htmlonly $*.txt $* |
465 | 29 |
9162
2399362b3bb0
doc: link man pages to one another
Martin Geisler <mg@lazybytes.net>
parents:
9161
diff
changeset
|
30 %.html: %.txt common.txt |
10971
cbe400a8e217
doc: add generic frontend to rst2man and rst2html
Martin Geisler <mg@aragost.com>
parents:
10555
diff
changeset
|
31 $(PYTHON) runrst html --halt warning \ |
9626
d1aa5393bef4
doc: add a style sheet to the generated HTML pages
Martin Geisler <mg@lazybytes.net>
parents:
9445
diff
changeset
|
32 --link-stylesheet --stylesheet-path style.css $*.txt $*.html |
465 | 33 |
3872
9d7ac8613340
fix MANIFEST generation
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3269
diff
changeset
|
34 MANIFEST: man html |
9401
2a5144687727
doc/Makefile: Don't show Makefile comments in output
Mads Kiilerich <mads@kiilerich.com>
parents:
9400
diff
changeset
|
35 # tracked files are already in the main MANIFEST |
3872
9d7ac8613340
fix MANIFEST generation
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3269
diff
changeset
|
36 $(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
|
37 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
|
38 echo "doc/$$i" >> $@ ; \ |
9d7ac8613340
fix MANIFEST generation
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3269
diff
changeset
|
39 done |
9d7ac8613340
fix MANIFEST generation
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3269
diff
changeset
|
40 |
2233 | 41 install: man |
42 for i in $(MAN) ; do \ | |
8822
1027da7d2fb9
doc: fix regexp for determining the man page section
Cédric Duval <cedricduval@free.fr>
parents:
8311
diff
changeset
|
43 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
|
44 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
|
45 $(INSTALL) $$i $(DESTDIR)$(MANDIR)/$$subdir ; \ |
2233 | 46 done |
47 | |
465 | 48 clean: |
9158
d6eecafaf12f
doc: use reStructuredText for man and HTML pages
Martin Geisler <mg@lazybytes.net>
parents:
9107
diff
changeset
|
49 $(RM) $(MAN) $(MAN:%=%.html) *.[0-9].gendoc.txt MANIFEST |