Mercurial > hg > nginx-site
comparison GNUmakefile @ 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 | 99ea52dbb4d4 |
children | 46bb8caea2ab |
comparison
equal
deleted
inserted
replaced
735:e1593207d1cb | 736:9f2953d854fd |
---|---|
81 news: $(OUT)/index.html $(OUT)/index.rss | 81 news: $(OUT)/index.html $(OUT)/index.rss |
82 arx: $(OUT)/2011.html $(OUT)/2010.html $(OUT)/2009.html | 82 arx: $(OUT)/2011.html $(OUT)/2010.html $(OUT)/2009.html |
83 404: $(OUT)/404.html | 83 404: $(OUT)/404.html |
84 | 84 |
85 | 85 |
86 DIRIND_DEPS = | |
87 | |
86 define lang-specific | 88 define lang-specific |
87 | 89 |
88 TOP= | 90 TOP= |
89 DOCS= | 91 DOCS= |
90 REFS= | 92 REFS= |
101 $(OUT)/$(lang)/docs/$$(f).html) | 103 $(OUT)/$(lang)/docs/$$(f).html) |
102 | 104 |
103 $(OUT)/$(lang)/docs/faq.html: \ | 105 $(OUT)/$(lang)/docs/faq.html: \ |
104 $$(foreach f,$$(FAQ),$(OUT)/$(lang)/docs/$$(f).html) | 106 $$(foreach f,$$(FAQ),$(OUT)/$(lang)/docs/$$(f).html) |
105 | 107 |
108 ifneq (,$$(filter dirindex,$$(DOCS))) | |
109 DIRIND_DEPS += xml/$(lang)/docs/dirindex.xml | |
106 xml/$(lang)/docs/dirindex.xml: \ | 110 xml/$(lang)/docs/dirindex.xml: \ |
107 $$(foreach f,$$(REFS),xml/$(lang)/docs/$$(f).xml) \ | 111 $$(foreach f,$$(REFS),xml/$(lang)/docs/$$(f).xml) \ |
108 xslt/dirindex.xslt | 112 xslt/dirindex.xslt |
109 echo "<modules>$$(patsubst %, \ | 113 echo "<modules>$$(patsubst %, \ |
110 <module name=\"%\"/>, $$(filter %.xml,$$^))</modules>" | \ | 114 <module name=\"%\"/>, $$(filter %.xml,$$^))</modules>" | \ |
111 xsltproc -o - --stringparam LANG $(lang) \ | 115 xsltproc -o - --stringparam LANG $(lang) \ |
112 xslt/dirindex.xslt - | \ | 116 xslt/dirindex.xslt - | \ |
113 sed 's;xml/[^/]*/docs/;;g' > $$@ | 117 sed 's;xml/[^/]*/docs/;;g' > $$@ |
118 endif | |
114 | 119 |
115 endef | 120 endef |
116 | 121 |
117 $(foreach lang, $(LANGS), $(eval $(call lang-specific))) | 122 $(foreach lang, $(LANGS), $(eval $(call lang-specific))) |
123 | |
124 $(foreach lang, $(LANGS), $(OUT)/$(lang)/docs/dirindex.html): $(DIRIND_DEPS) | |
118 | 125 |
119 $(OUT)/index.html: \ | 126 $(OUT)/index.html: \ |
120 xml/index.xml \ | 127 xml/index.xml \ |
121 $(NEWS_DEPS) | 128 $(NEWS_DEPS) |
122 $(call XSLT, xslt/news.xslt, $<, $@) | 129 $(call XSLT, xslt/news.xslt, $<, $@) |