mirror of
https://github.com/facebook/sapling.git
synced 2025-01-06 04:43:19 +03:00
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:
parent
4e9e5e1a97
commit
2d38f7b9dd
@ -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
|
||||
|
19
doc/Makefile
19
doc/Makefile
@ -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
|
||||
|
@ -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
|
||||
======
|
@ -19,7 +19,7 @@ configuration files for Mercurial
|
||||
Description
|
||||
===========
|
||||
|
||||
.. include:: ../mercurial/help/config.txt
|
||||
.. include:: hgrc.5.gendoc.txt
|
||||
|
||||
Author
|
||||
======
|
Loading…
Reference in New Issue
Block a user