Skip to content
Snippets Groups Projects
Commit e4318468 authored by Takumi IINO's avatar Takumi IINO
Browse files

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.
parent 81fbd4e6
Branches
Tags
No related merge requests found
......@@ -25,4 +25,5 @@
build
contrib/hgsh/hgsh
dist
doc/common.txt
doc/*.[0-9]
......@@ -28,4 +29,5 @@
doc/*.[0-9]
doc/*.[0-9].txt
doc/*.[0-9].gendoc.txt
doc/*.[0-9].{x,ht}ml
MANIFEST
......
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,10 +18,7 @@
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 $@
......@@ -26,10 +23,6 @@
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 $*
......@@ -33,7 +26,7 @@
$(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 @@
done
clean:
$(RM) $(MAN) $(HTML) hg.1.gendoc.txt MANIFEST
$(RM) $(MAN) $(HTML) common.txt $(SOURCES) $(SOURCES:%.txt=%.gendoc.txt) MANIFEST
......@@ -11,7 +11,7 @@
:Manual section: 5
:Manual group: Mercurial Manual
.. include:: ../mercurial/help/hgignore.txt
.. include:: hgignore.5.gendoc.txt
Author
======
......
......@@ -19,7 +19,7 @@
Description
===========
.. include:: ../mercurial/help/config.txt
.. include:: hgrc.5.gendoc.txt
Author
======
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment