equal
deleted
inserted
replaced
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 |
18 |
19 mofiles := |
19 mofiles := |
|
20 sitelist := dirhtml |
20 langs = fr kr |
21 langs = fr kr |
21 rstfiles = $(shell find * -name '*.rst') |
22 rstfiles = $(shell find * -name '*.rst') |
22 define by_lang |
23 define by_lang |
23 mos = $$(rstfiles:%.rst=locale/$(1)/LC_MESSAGES/%.mo) |
24 mos = $$(rstfiles:%.rst=locale/$(1)/LC_MESSAGES/%.mo) |
24 $$(mos):locale/$(1)/LC_MESSAGES/%.mo: %_$(1).po |
25 $$(mos):locale/$(1)/LC_MESSAGES/%.mo: %_$(1).po |
26 msgfmt $$^ -o $$@ |
27 msgfmt $$^ -o $$@ |
27 mofiles += $$(mos) |
28 mofiles += $$(mos) |
28 pos = $$(rstfiles:%.rst=%_$(1).po) |
29 pos = $$(rstfiles:%.rst=%_$(1).po) |
29 $$(pos):%_$(1).po: $(BUILDDIR)/locale/%.pot |
30 $$(pos):%_$(1).po: $(BUILDDIR)/locale/%.pot |
30 if [ -e $$@ ] ; then msgmerge -U $$@ $$<; else cat $$< > $$@; fi |
31 if [ -e $$@ ] ; then msgmerge -U $$@ $$<; else cat $$< > $$@; fi |
|
32 |
|
33 site_$(1): $$(mos) |
|
34 $(SPHINXBUILD) -D language=$(1) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml_$(1) |
|
35 find $(BUILDDIR)/dirhtml_$(1) -name "index.html" -print -exec mv {} {}.$(1) ';' |
|
36 sitelist += site_$(1) |
|
37 |
31 endef |
38 endef |
32 $(foreach lang, $(langs), $(eval $(call by_lang,$(lang)))) |
39 $(foreach lang, $(langs), $(eval $(call by_lang,$(lang)))) |
|
40 |
|
41 |
|
42 all: $(sitelist) |
|
43 mkdir -p $(BUILDDIR)/final |
|
44 #cp -av $(BUILDDIR)/dirhtml*/* $(BUILDDIR)/final || true |
33 |
45 |
34 mofiles: $(mofiles) |
46 mofiles: $(mofiles) |
35 |
47 |
36 help: |
48 help: |
37 @echo "Please use \`make <target>' where <target> is one of" |
49 @echo "Please use \`make <target>' where <target> is one of" |