Mercurial > hg > nginx-site
diff 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 |
line wrap: on
line diff
--- a/GNUmakefile +++ b/GNUmakefile @@ -80,6 +80,7 @@ 404: $(OUT)/404.html DIRIND_DEPS = +VARIND_DEPS = define lang-specific @@ -113,12 +114,26 @@ xml/$(lang)/docs/dirindex.xml: \ sed 's;xml/[^/]*/docs/;;g' > $$@ endif +ifneq (,$$(filter varindex,$$(DOCS))) +VARIND_DEPS += xml/$(lang)/docs/varindex.xml +xml/$(lang)/docs/varindex.xml: \ + $$(foreach f,$$(REFS),xml/$(lang)/docs/$$(f).xml) \ + xslt/varindex.xslt + echo "<modules>$$(patsubst %, \ + <module name=\"%\"/>, $$(filter %.xml,$$^))</modules>" | \ + xsltproc -o - --stringparam LANG $(lang) \ + xslt/varindex.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) +$(foreach lang, $(LANGS), $(OUT)/$(lang)/docs/varindex.html): $(VARIND_DEPS) + $(OUT)/index.html: \ xml/index.xml \ $(NEWS_DEPS) @@ -283,6 +298,7 @@ copy_dirmap: endif clean: - rm -rf $(ZIP) $(OUT) xml/*/docs/dirindex.xml dir.map + rm -rf $(ZIP) $(OUT) xml/*/docs/dirindex.xml dir.map \ + xml/*/docs/varindex.xml .DELETE_ON_ERROR: