Mercurial > hg > nginx-site
comparison GNUmakefile @ 1156:8e8a6a7cff2b
Added variables index.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Wed, 16 Apr 2014 14:22:51 +0400 |
parents | 28c05aa07b5f |
children | 166fd33afad1 |
comparison
equal
deleted
inserted
replaced
1155:07402a11fd8d | 1156:8e8a6a7cff2b |
---|---|
78 arx: $(foreach year,$(YEARS),$(OUT)/$(year).html) | 78 arx: $(foreach year,$(YEARS),$(OUT)/$(year).html) |
79 404: $(OUT)/404.html | 79 404: $(OUT)/404.html |
80 | 80 |
81 | 81 |
82 DIRIND_DEPS = | 82 DIRIND_DEPS = |
83 VARIND_DEPS = | |
83 | 84 |
84 define lang-specific | 85 define lang-specific |
85 | 86 |
86 TOP= | 87 TOP= |
87 DOCS= | 88 DOCS= |
111 xsltproc -o - --stringparam LANG $(lang) \ | 112 xsltproc -o - --stringparam LANG $(lang) \ |
112 xslt/dirindex.xslt - | \ | 113 xslt/dirindex.xslt - | \ |
113 sed 's;xml/[^/]*/docs/;;g' > $$@ | 114 sed 's;xml/[^/]*/docs/;;g' > $$@ |
114 endif | 115 endif |
115 | 116 |
117 ifneq (,$$(filter varindex,$$(DOCS))) | |
118 VARIND_DEPS += xml/$(lang)/docs/varindex.xml | |
119 xml/$(lang)/docs/varindex.xml: \ | |
120 $$(foreach f,$$(REFS),xml/$(lang)/docs/$$(f).xml) \ | |
121 xslt/varindex.xslt | |
122 echo "<modules>$$(patsubst %, \ | |
123 <module name=\"%\"/>, $$(filter %.xml,$$^))</modules>" | \ | |
124 xsltproc -o - --stringparam LANG $(lang) \ | |
125 xslt/varindex.xslt - | \ | |
126 sed 's;xml/[^/]*/docs/;;g' > $$@ | |
127 endif | |
128 | |
116 endef | 129 endef |
117 | 130 |
118 $(foreach lang, $(LANGS), $(eval $(call lang-specific))) | 131 $(foreach lang, $(LANGS), $(eval $(call lang-specific))) |
119 | 132 |
120 $(foreach lang, $(LANGS), $(OUT)/$(lang)/docs/dirindex.html): $(DIRIND_DEPS) | 133 $(foreach lang, $(LANGS), $(OUT)/$(lang)/docs/dirindex.html): $(DIRIND_DEPS) |
134 | |
135 $(foreach lang, $(LANGS), $(OUT)/$(lang)/docs/varindex.html): $(VARIND_DEPS) | |
121 | 136 |
122 $(OUT)/index.html: \ | 137 $(OUT)/index.html: \ |
123 xml/index.xml \ | 138 xml/index.xml \ |
124 $(NEWS_DEPS) | 139 $(NEWS_DEPS) |
125 $(call XSLT, xslt/news.xslt, $<, $@) | 140 $(call XSLT, xslt/news.xslt, $<, $@) |
281 copy_dirmap: | 296 copy_dirmap: |
282 /usr/local/bin/copy_dirmap.sh dir.map | 297 /usr/local/bin/copy_dirmap.sh dir.map |
283 endif | 298 endif |
284 | 299 |
285 clean: | 300 clean: |
286 rm -rf $(ZIP) $(OUT) xml/*/docs/dirindex.xml dir.map | 301 rm -rf $(ZIP) $(OUT) xml/*/docs/dirindex.xml dir.map \ |
302 xml/*/docs/varindex.xml | |
287 | 303 |
288 .DELETE_ON_ERROR: | 304 .DELETE_ON_ERROR: |