Mercurial > hg > nginx-site
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 +++ 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)