# 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 --git a/GNUmakefile b/GNUmakefile --- a/GNUmakefile +++ b/GNUmakefile @@ -83,6 +83,8 @@ arx: $(OUT)/2011.html $(OUT)/2010.html 404: $(OUT)/404.html +DIRIND_DEPS = + define lang-specific TOP= @@ -103,6 +105,8 @@ include xml/$(lang)/GNUmakefile $(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 @@ xml/$(lang)/docs/dirindex.xml: \ 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)