equal
deleted
inserted
replaced
13 ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . |
13 ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . |
14 # the i18n builder cannot share the environment and doctrees with the others |
14 # the i18n builder cannot share the environment and doctrees with the others |
15 I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . |
15 I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . |
16 |
16 |
17 .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext |
17 .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext |
|
18 |
|
19 mofiles := |
|
20 langs = fr kr |
|
21 rstfiles = $(shell find * -name '*.rst') |
|
22 define by_lang |
|
23 mos = $$(rstfiles:%.rst=locale/$(1)/LC_MESSAGES/%.mo) |
|
24 $$(mos):locale/$(1)/LC_MESSAGES/%.mo: %_$(1).po |
|
25 mkdir -p `dirname $$@` |
|
26 msgfmt $$^ -o $$@ |
|
27 mofiles += $$(mos) |
|
28 pos = $$(rstfiles:%.rst=%_$(1).po) |
|
29 $$(pos):%_$(1).po: $(BUILDDIR)/locale/%.pot |
|
30 if [ -e $$@ ] ; then msgmerge -U $$@ $$<; else cat $$< > $$@; fi |
|
31 endef |
|
32 $(foreach lang, $(langs), $(eval $(call by_lang,$(lang)))) |
|
33 |
|
34 mofiles: $(mofiles) |
18 |
35 |
19 help: |
36 help: |
20 @echo "Please use \`make <target>' where <target> is one of" |
37 @echo "Please use \`make <target>' where <target> is one of" |
21 @echo " html to make standalone HTML files" |
38 @echo " html to make standalone HTML files" |
22 @echo " dirhtml to make HTML files named index.html in directories" |
39 @echo " dirhtml to make HTML files named index.html in directories" |
134 gettext: |
151 gettext: |
135 $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale |
152 $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale |
136 @echo |
153 @echo |
137 @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." |
154 @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." |
138 |
155 |
|
156 |
139 changes: |
157 changes: |
140 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes |
158 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes |
141 @echo |
159 @echo |
142 @echo "The overview file is in $(BUILDDIR)/changes." |
160 @echo "The overview file is in $(BUILDDIR)/changes." |
143 |
161 |