changeset 432:fbba1f292dc9

Generate mapping of directives to URIs in the nginx map format.
author Ruslan Ermilov <ru@nginx.com>
date Tue, 28 Feb 2012 08:06:22 +0000
parents 0412333658fe
children 07c513842c98
files GNUmakefile xsls/dirmap.xsls
diffstat 2 files changed, 26 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -263,4 +263,12 @@ tarball:
 		--exclude .svn						\
 		$(SITE)
 
+dir.map:	xslt/dirmap.xslt xml/en/docs/dirindex.xml
+	@xsltproc -o - xslt/dirmap.xslt xml/en/docs/dirindex.xml |	\
+	sort -u -k1,1 | sed 's/^include /\\&/' > $@
+
+ifeq ($(patsubst %.nginx.org,YES,$(shell hostname)), YES)
+all:	dir.map
+endif
+
 .DELETE_ON_ERROR:
new file mode 100644
--- /dev/null
+++ b/xsls/dirmap.xsls
@@ -0,0 +1,18 @@
+X:stylesheet {
+
+X:output method="text";
+
+X:template = "link" {
+    !{@id}
+    X:text{ }
+    !{substring-before(@doc, '.xml')}
+    X:text{.html#}
+    !{@id}
+    X:text{;&#10;}
+}
+
+X:template = "links" {
+    !! "link";
+}
+
+}