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.
This commit is contained in:
Takumi IINO 2013-07-03 21:49:43 +09:00
parent 4e9e5e1a97
commit 2d38f7b9dd
6 changed files with 10 additions and 15 deletions

View File

@ -25,7 +25,9 @@ tests/htmlcov
build
contrib/hgsh/hgsh
dist
doc/common.txt
doc/*.[0-9]
doc/*.[0-9].txt
doc/*.[0-9].gendoc.txt
doc/*.[0-9].{x,ht}ml
MANIFEST

View File

@ -1,4 +1,4 @@
SOURCES=$(wildcard *.[0-9].txt)
SOURCES=$(notdir $(wildcard ../mercurial/help/*.[0-9].txt))
MAN=$(SOURCES:%.txt=%)
HTML=$(SOURCES:%.txt=%.html)
GENDOC=gendoc.py ../mercurial/commands.py ../mercurial/help.py \
@ -18,22 +18,15 @@ man: $(MAN)
html: $(HTML)
hg.1.txt: hg.1.gendoc.txt
touch hg.1.txt
hg.1.gendoc.txt: $(GENDOC)
${PYTHON} gendoc.py hg.1.gendoc > $@.tmp
common.txt $(SOURCES) $(SOURCES:%.txt=%.gendoc.txt): $(GENDOC)
${PYTHON} gendoc.py $(basename $@) > $@.tmp
mv $@.tmp $@
hgrc.5: ../mercurial/help/config.txt
hgrc.5.html: ../mercurial/help/config.txt
%: %.txt common.txt
%: %.txt %.gendoc.txt common.txt
$(PYTHON) runrst hgmanpage $(RSTARGS) --halt warning \
--strip-elements-with-class htmlonly $*.txt $*
%.html: %.txt common.txt
%.html: %.txt %.gendoc.txt common.txt
$(PYTHON) runrst html $(RSTARGS) --halt warning \
--link-stylesheet --stylesheet-path style.css $*.txt $*.html
@ -52,4 +45,4 @@ install: man
done
clean:
$(RM) $(MAN) $(HTML) hg.1.gendoc.txt MANIFEST
$(RM) $(MAN) $(HTML) common.txt $(SOURCES) $(SOURCES:%.txt=%.gendoc.txt) MANIFEST

View File

@ -11,7 +11,7 @@ syntax for Mercurial ignore files
:Manual section: 5
:Manual group: Mercurial Manual
.. include:: ../mercurial/help/hgignore.txt
.. include:: hgignore.5.gendoc.txt
Author
======

View File

@ -19,7 +19,7 @@ configuration files for Mercurial
Description
===========
.. include:: ../mercurial/help/config.txt
.. include:: hgrc.5.gendoc.txt
Author
======