Mercurial > hg
comparison doc/Makefile @ 19426:e43184680461
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.
author | Takumi IINO <trot.thunder@gmail.com> |
---|---|
date | Wed, 03 Jul 2013 21:49:43 +0900 |
parents | 81fbd4e66ff5 |
children | 80983af366b5 |
comparison
equal
deleted
inserted
replaced
19425:81fbd4e66ff5 | 19426:e43184680461 |
---|---|
1 SOURCES=$(wildcard *.[0-9].txt) | 1 SOURCES=$(notdir $(wildcard ../mercurial/help/*.[0-9].txt)) |
2 MAN=$(SOURCES:%.txt=%) | 2 MAN=$(SOURCES:%.txt=%) |
3 HTML=$(SOURCES:%.txt=%.html) | 3 HTML=$(SOURCES:%.txt=%.html) |
4 GENDOC=gendoc.py ../mercurial/commands.py ../mercurial/help.py \ | 4 GENDOC=gendoc.py ../mercurial/commands.py ../mercurial/help.py \ |
5 ../mercurial/help/*.txt ../hgext/*.py ../hgext/*/__init__.py | 5 ../mercurial/help/*.txt ../hgext/*.py ../hgext/*/__init__.py |
6 PREFIX=/usr/local | 6 PREFIX=/usr/local |
16 | 16 |
17 man: $(MAN) | 17 man: $(MAN) |
18 | 18 |
19 html: $(HTML) | 19 html: $(HTML) |
20 | 20 |
21 hg.1.txt: hg.1.gendoc.txt | 21 common.txt $(SOURCES) $(SOURCES:%.txt=%.gendoc.txt): $(GENDOC) |
22 touch hg.1.txt | 22 ${PYTHON} gendoc.py $(basename $@) > $@.tmp |
23 | |
24 hg.1.gendoc.txt: $(GENDOC) | |
25 ${PYTHON} gendoc.py hg.1.gendoc > $@.tmp | |
26 mv $@.tmp $@ | 23 mv $@.tmp $@ |
27 | 24 |
28 hgrc.5: ../mercurial/help/config.txt | 25 %: %.txt %.gendoc.txt common.txt |
29 | |
30 hgrc.5.html: ../mercurial/help/config.txt | |
31 | |
32 %: %.txt common.txt | |
33 $(PYTHON) runrst hgmanpage $(RSTARGS) --halt warning \ | 26 $(PYTHON) runrst hgmanpage $(RSTARGS) --halt warning \ |
34 --strip-elements-with-class htmlonly $*.txt $* | 27 --strip-elements-with-class htmlonly $*.txt $* |
35 | 28 |
36 %.html: %.txt common.txt | 29 %.html: %.txt %.gendoc.txt common.txt |
37 $(PYTHON) runrst html $(RSTARGS) --halt warning \ | 30 $(PYTHON) runrst html $(RSTARGS) --halt warning \ |
38 --link-stylesheet --stylesheet-path style.css $*.txt $*.html | 31 --link-stylesheet --stylesheet-path style.css $*.txt $*.html |
39 | 32 |
40 MANIFEST: man html | 33 MANIFEST: man html |
41 # tracked files are already in the main MANIFEST | 34 # tracked files are already in the main MANIFEST |
50 mkdir -p $(DESTDIR)$(MANDIR)/$$subdir ; \ | 43 mkdir -p $(DESTDIR)$(MANDIR)/$$subdir ; \ |
51 $(INSTALL) $$i $(DESTDIR)$(MANDIR)/$$subdir ; \ | 44 $(INSTALL) $$i $(DESTDIR)$(MANDIR)/$$subdir ; \ |
52 done | 45 done |
53 | 46 |
54 clean: | 47 clean: |
55 $(RM) $(MAN) $(HTML) hg.1.gendoc.txt MANIFEST | 48 $(RM) $(MAN) $(HTML) common.txt $(SOURCES) $(SOURCES:%.txt=%.gendoc.txt) MANIFEST |