Commit Graph

54 Commits

Author SHA1 Message Date
Takumi IINO
c57d1116da doc: make i18n man and html
Allow overwrite LANGUAGE and LC_ALL make variables, for make i18n man and html.
After this patch, we can make i18n man and html by following command:

  $ make clean all LANGUAGE=ja
2013-07-03 21:50:20 +09:00
Takumi IINO
2d38f7b9dd doc: make man and html from translated documents
Before this patch, man and html are english only, and there sources are not
translatable.
This patch make translatable all documents.
2013-07-03 21:49:43 +09:00
Takumi IINO
4e9e5e1a97 gendoc: dispatch print document content by commandline arguments
Before this patch, gendoc.py only prints hg.1.gendoc.txt content.
This adds any content print function.
2013-07-03 21:49:41 +09:00
Martin Geisler
8a54b72005 doc: rebuild hgrc.5 man and HTML page when help/config changes 2011-05-30 11:14:31 +02:00
Nicolas Dumazet
269e64900b 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
2010-12-01 09:46:11 +09:00
Martin Geisler
f6008443c8 doc/Makefile: docs now also depend on extensions
After 782257d279ce the hg(1) manpage contains a section with help
extracted from the extensions, so we should depend on them too.
2010-11-04 17:52:40 +01:00
Martin Geisler
549ae660d7 doc/Makefile: do not include hg.1.gendoc.txt in MANIFEST
It is an intermediate file used to produce the hg.1 and .hg.1.html
files and is not useful for people who download the tarball. It will
be regenerated automatically by the Makefile if users want to rebuild
the documentation.
2010-10-23 20:10:18 +02:00
Martin Geisler
ce3f69d067 doc/Makefile: cleanup clean target 2010-10-23 20:02:46 +02:00
Mads Kiilerich
8a38c3ba07 doc: make sure we use our own code for generating man pages
docutils would in some situations pick up its own manpage.py instead of
doc/manpage.py. Renaming to hgmanpage.py makes it less ambiguous.
2010-07-21 17:51:37 +02:00
Martin Geisler
ce3c2717e9 doc: add generic frontend to rst2man and rst2html
This will allow us to easily register new roles and directives.
2010-04-22 09:57:04 +02:00
Wagner Bruna
7733a703e9 doc/Makefile: fix doc generation when LANGUAGE is set 2010-02-24 13:47:59 -03:00
Martin Geisler
7795200223 Merge with stable 2009-12-17 00:32:26 +01:00
Mads Kiilerich
30c9ad5ebc doc/Makefile: Fix rst2html detection
Displaying the output from the failing call to "which" didn't prevent
make from doing stupid things later. We now only search for "rst2html"
and fallback to "rst2html.py". If neither name is found, make will
eventually abort when we try to use $(RST2HTML).
2009-12-16 23:59:50 +01:00
Martin Geisler
b076a1e802 doc/Makefile: ensure C locale
The man pages can actually be translated by building them in a
different locale. However, the man pages contain internal links to
certain sections, and when the section titles are translated, the
links change too. So it is currently not recommended to build the man
pages in anything by the "C" locale.
2009-12-01 00:43:21 +01:00
Christian Ebert
3e187bbeb8 doc: correct path to help files in Makefile 2009-12-03 22:37:49 +01:00
Martin Geisler
05e89d7e15 doc/Makefile: add help/*.txt as a dependency 2009-11-02 21:38:42 +01:00
Martin Geisler
b04344b176 doc: add a style sheet to the generated HTML pages 2009-10-21 23:40:01 +02:00
Martin Geisler
946a84caa7 doc/Makefile: make rst2html and rst2man halt on warnings 2009-09-13 17:08:31 +02:00
Martin Geisler
24e70f5cb2 doc/Makefile: do not create files in case of errors
When stdout is redirected to the target file directly, the file is
created as an empty file even when an error occurs. Since the file is
there, 'make' wont try to re-create it in subsequent runs.

This fix is similar to the one in 5c3820db5c29, but it also takes care
of rst2html and gendoc.py.
2009-09-13 17:05:38 +02:00
Martin Geisler
8de4494620 doc: add TOC to hg.1.html and hgrc.5.html 2009-09-04 22:26:57 +02:00
Martin Geisler
8ee86503c8 doc: use our own rst2man.py script (issue1746)
The rst2man tool has not yet been part of an official Docutils
release, and it is not present in most distributions. This poses a
problem for people who want to install Mercurial from source, or who
want to create a Mercurial package for such a distribution -- how to
specify the build-dependencies?

By including the rst2man.py script with Mercurial people only need a
normal Docutils installation in order to install Mercurial.
2009-09-03 21:36:44 +02:00
Mads Kiilerich
2cd7eecc00 doc/Makefile: detect the right name for rst2man and rst2html
docutils uses the .py extension on the commands, and so do their installer.
Distribution packages might strip the .py, but the official name should work too.
2009-08-20 23:35:46 +02:00
Mads Kiilerich
d476cb112b doc/Makefile: Don't show Makefile comments in output
The comments makes sense when editing Makefile, but not when watching its
output where it looks too much like error messages.
2009-08-20 23:35:47 +02:00
Mads Kiilerich
1f8cac4ff1 doc/Makefile: detect rst2man errors
Make couldn't detect rst2man errors when it wasn't the last command, so empty
man page files would be installed.
2009-08-20 23:35:37 +02:00
Martin Geisler
6d834b7cc4 doc: link man pages to one another 2009-07-16 23:25:26 +02:00
Martin Geisler
47b638b157 doc: fixup font markup in man pages
This exposed a bug in rst2man where it neglects to escape a literal
backslash. A patch has been applied upstream, but not yet packaged in,
say, Debian unstable. A forward-compatible work-around has therefore
been put in place.
2009-07-16 23:25:26 +02:00
Martin Geisler
ab7c29bc29 doc: add newline after literal blocks in man pages
The rst2man writer leaves no space between a literal block and the
following paragraph. This patch corrects this.

It has also been applied upstream. This does not conflict with this
change since any number of newlines can be added without effecting the
rendered man page.
2009-07-16 23:25:26 +02:00
Martin Geisler
92882a99d0 doc: use reStructuredText for man and HTML pages
The Makefile now requires the rst2html and rst2man programs. Both can
be found in Debian testing or downloaded from the Docutils homepage:

  http://docutils.sf.net/
  http://docutils.sf.net/sandbox/manpage-writer/

The new HTML and man pages no longer contain huge amounts of
un-wrapping literal blocks, thanks to how snippets of reStructuredText
can easily be included inside other reStructuredText documents.

The HTML pages now have anchors for all sections, including the help
topics in hgrc.1 which were missing from the old HTML pages.
2009-07-16 23:25:26 +02:00
Martin Geisler
784725778f doc/Makefile: let hg1.gendoc.txt depend on gendoc.py 2009-07-10 01:23:07 +02:00
Cédric Duval
32cb7a3823 doc: fix regexp for determining the man page section
Preceding a .* pattern with an other dot serves little purpose,
better anchor the regexp to the start of the file name.
2009-06-10 19:59:44 +02:00
Giorgos Keramidas
afd8c70fd6 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.
2009-05-07 15:08:25 +03:00
Christian Ebert
d3b93918d5 Do not install executable man pages
Default mode of install might be 755, therefore specify 644.
2009-01-25 12:21:57 +01:00
Patrick Mezard
2771395c7d Document how HTML documentation is built under Windows 2009-01-17 15:15:26 +01:00
Christian Ebert
c486b58886 doc/Makefile: rephrase comment (typo) 2008-08-28 13:06:24 +02:00
Dirkjan Ochtman
331f22c437 use ${PYTHON} var in doc/Makefile as well 2008-06-24 09:33:13 +02:00
Christian Ebert
d68174388b doc: escape .hg at bol in manpages with make (issue1072)
This works around a bug in old docbook stylesheets.
Remove .*.swp example from hgignore.5.txt.

Diagnosis and workaround thanks to Alexis S. L. Carvalho.
2008-04-07 09:02:04 +02:00
Thomas Arendsen Hein
28e90ca5c4 Fixed double slash for doc install path introduced by using $DESTDIR (issue620)
$MANDIR already is an absolute path so the extra / isn't needed.
2007-07-08 12:58:19 +02:00
Jonathan Smith
873ddc131c use DESTDIR both places its needed 2007-01-15 15:49:06 -05:00
Jonathan Smith
5282371a7c honor DESTDIR env variable for docs' make install 2007-01-15 15:31:38 -05:00
Jonathan Smith
2389afe820 install man pages by default into $(PREFIX)/share/man not $(PREFIX)/man since the FHS puts them there 2007-01-15 15:30:50 -05:00
Thomas Arendsen Hein
ef969c8db0 Include hg.1.gendoc.txt in doc/MANIFEST to prevent unnecessary rebuild. 2006-12-16 13:57:37 +01:00
Thomas Arendsen Hein
9a5ca784b6 Regenerate hg.1 manpage if help text in help.py changes. 2006-12-16 13:54:23 +01:00
Benoit Boissinot
253a9af902 fix MANIFEST generation 2006-12-12 11:39:05 +01:00
Thomas Arendsen Hein
84a05c493c Some versions of sed don't support .\+, so use ..* instead.
Reported by Christian Ebert for MacOS X.
2006-10-05 20:03:38 +02:00
Thomas Arendsen Hein
42c4074e72 Corrected install location of manpages.
(man/manSECTION/ instead of man/man.SECTION/)
2006-10-04 18:43:40 +02:00
wilde@trapperkeeper.sha-bang.de
5d9b2c557e Added install target. 2006-05-09 17:05:49 +02:00
Thomas Arendsen Hein
d465810792 make clean now removes generated documentation. 2006-03-10 20:06:41 +01:00
Thomas Arendsen Hein
14700b71df Regenerate hg.1.gendoc.txt if commands.py changed. 2006-03-01 09:19:27 +01:00
Benoit Boissinot
f1aae6bd52 generate hg manpage from commands.py docstring
gendoc.py is a script generating a part of the manpage (the commands
help and options) from the docstring in commands.py.
It avoids duplicating the doc between the doc/ directory and the docstrings.
To generate the manpage, 'make doc' will create all the necessary intermediate
files.
2006-02-28 00:48:49 +01:00
Thomas Arendsen Hein
5ac036946f Fall back to asciidoc6 html backend if html4 doesn't work.
This reenables building documentation on Debian sarge,
which broke after 95bbf2b4e4f9.
2006-02-03 10:54:58 +01:00