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	Wed Apr 16 13:55:53 2014 +0400
+++ b/GNUmakefile	Wed Apr 16 14:22:51 2014 +0400
@@ -80,6 +80,7 @@
 
 
 DIRIND_DEPS =
+VARIND_DEPS =
 
 define lang-specific
 
@@ -113,12 +114,26 @@
 	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 @@
 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: