doc/Makefile
changeset 812 d7251818be37
parent 811 66a8812457d6
child 1723 e0cefb1d5206
--- a/doc/Makefile	Sat Sep 08 01:24:36 2012 +0200
+++ b/doc/Makefile	Sat Sep 08 02:12:10 2012 +0200
@@ -17,6 +17,7 @@
 .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
 
 mofiles :=
+sitelist := dirhtml
 langs = fr kr
 rstfiles = $(shell find * -name '*.rst')
 define by_lang
@@ -28,9 +29,20 @@
 pos = $$(rstfiles:%.rst=%_$(1).po)
 $$(pos):%_$(1).po: $(BUILDDIR)/locale/%.pot 
 	if [ -e $$@ ] ; then msgmerge -U $$@ $$<; else cat $$< > $$@; fi
+
+site_$(1): $$(mos)
+	$(SPHINXBUILD) -D language=$(1) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml_$(1)
+	find $(BUILDDIR)/dirhtml_$(1) -name "index.html" -print -exec mv {} {}.$(1) ';'
+sitelist += site_$(1)
+
 endef
 $(foreach lang, $(langs), $(eval $(call by_lang,$(lang))))
 
+
+all: $(sitelist)
+	mkdir -p $(BUILDDIR)/final
+	#cp -av $(BUILDDIR)/dirhtml*/* $(BUILDDIR)/final || true
+
 mofiles: $(mofiles)
 
 help: