changeset 736:9f2953d854fd

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.
author Ruslan Ermilov <ru@nginx.com>
date Thu, 18 Oct 2012 13:41:43 +0000
parents e1593207d1cb
children 46bb8caea2ab
files GNUmakefile
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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)