# HG changeset patch # User Ruslan Ermilov # Date 1350567703 0 # Node ID 9f2953d854fd069589276102635e1196fadced54 # Parent e1593207d1cbc996dcf427c67198bdd3790da846 Fixed language switcher in dirindex.html files by making them depend on all available translations of dirindex.xml. The problem with dirindex.xml files was that they are auto-generated. diff -r e1593207d1cb -r 9f2953d854fd GNUmakefile --- a/GNUmakefile Thu Oct 18 13:35:13 2012 +0000 +++ b/GNUmakefile Thu Oct 18 13:41:43 2012 +0000 @@ -83,6 +83,8 @@ 404: $(OUT)/404.html +DIRIND_DEPS = + define lang-specific TOP= @@ -103,6 +105,8 @@ $(OUT)/$(lang)/docs/faq.html: \ $$(foreach f,$$(FAQ),$(OUT)/$(lang)/docs/$$(f).html) +ifneq (,$$(filter dirindex,$$(DOCS))) +DIRIND_DEPS += xml/$(lang)/docs/dirindex.xml xml/$(lang)/docs/dirindex.xml: \ $$(foreach f,$$(REFS),xml/$(lang)/docs/$$(f).xml) \ xslt/dirindex.xslt @@ -111,11 +115,14 @@ xsltproc -o - --stringparam LANG $(lang) \ xslt/dirindex.xslt - | \ sed 's;xml/[^/]*/docs/;;g' > $$@ +endif endef $(foreach lang, $(LANGS), $(eval $(call lang-specific))) +$(foreach lang, $(LANGS), $(OUT)/$(lang)/docs/dirindex.html): $(DIRIND_DEPS) + $(OUT)/index.html: \ xml/index.xml \ $(NEWS_DEPS)