summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-05-31 12:24:06 +0000
committerGerald W. Carter <jerry@samba.org>2008-04-23 08:45:52 -0500
commit21d7340236ab8bb281179e057834b607820651f6 (patch)
treef1c552a5dde03c1db3928ca36b4814e0fd7f8383 /docs
parentb9b66d8e30798c6904b32f3e444fdd15bce29393 (diff)
downloadsamba-21d7340236ab8bb281179e057834b607820651f6.tar.gz
samba-21d7340236ab8bb281179e057834b607820651f6.tar.bz2
samba-21d7340236ab8bb281179e057834b607820651f6.zip
Generate summary of manpages
(This used to be commit da9b66e0e3fee0f4570583fec3e75bdcb931a56a)
Diffstat (limited to 'docs')
-rw-r--r--docs/Makefile.in7
-rw-r--r--docs/xslt/manpage-summary.xsl36
2 files changed, 42 insertions, 1 deletions
diff --git a/docs/Makefile.in b/docs/Makefile.in
index f7e91d0183..29791cb36f 100644
--- a/docs/Makefile.in
+++ b/docs/Makefile.in
@@ -58,7 +58,7 @@ PLUCKERDIR=$(OUTPUTDIR)/plucker
LATEX_FIGURES = xslt/figures/caution.pdf xslt/figures/important.pdf xslt/figures/note.pdf xslt/figures/tip.pdf xslt/figures/warning.pdf
MANPAGES_SOURCES = $(wildcard $(MANPAGEDIR)/*.?.xml)
MANPAGES = $(patsubst $(MANPAGEDIR)/%.xml,$(MANDIR)/%,$(MANPAGES_SOURCES)) $(MANDIR)/smb.conf.5
-MANPAGES_HTML = $(patsubst $(MANPAGEDIR)/%.xml,$(HTMLDIR)/%.html,$(MANPAGES_SOURCES)) $(HTMLDIR)/smb.conf.5.html
+MANPAGES_HTML = $(patsubst $(MANPAGEDIR)/%.xml,$(HTMLDIR)/%.html,$(MANPAGES_SOURCES)) $(HTMLDIR)/smb.conf.5.html $(HTMLDIR)/manpages.html
MANPAGES_PLUCKER = $(patsubst $(MANPAGEDIR)/%.xml,$(PLUCKERDIR)/%.pdb,$(MANPAGES_SOURCES)) $(PLUCKERDIR)/smb.conf.5.pdb
HOWTODIR_IMAGES_PNG = $(wildcard $(IMAGEPROJDIR)/*.png)
@@ -125,6 +125,11 @@ $(HTMLDIR)/guide: $(HTMLDIR) $(HTMLDIR)/guide/samba.css Samba-Guide.xml
manpages: $(MANDIR) $(MANPAGES)
+manpages.xml: $(MANPAGES_SOURCES)
+ echo "<article><variablelist>" > $@
+ for I in $(MANPAGES_SOURCES); do $(XSLTPROC) xslt/manpage-summary.xsl $$I >> $@; done
+ echo "</variablelist></article>" >> $@
+
tex: Samba-HOWTO-Collection.tex Samba-Developers-Guide.tex gpl.tex
plucker: html-single htmlman $(PLUCKERDIR) $(MANPAGES_PLUCKER) $(PLUCKERDIR)/Samba-Developers-Guide.pdb $(PLUCKERDIR)/Samba-HOWTO-Collection.pdb
diff --git a/docs/xslt/manpage-summary.xsl b/docs/xslt/manpage-summary.xsl
new file mode 100644
index 0000000000..295cf85749
--- /dev/null
+++ b/docs/xslt/manpage-summary.xsl
@@ -0,0 +1,36 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ version="1.1">
+
+ <xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="yes"/>
+
+ <xsl:template match="refentry">
+ <xsl:element name="varlistentry">
+ <xsl:apply-templates/>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template match="refentry/refmeta">
+ <xsl:element name="term">
+ <xsl:element name="ulink">
+ <xsl:attribute name="url">
+ <xsl:value-of select="refentrytitle"/><xsl:text>.</xsl:text><xsl:value-of select="manvolnum"/><xsl:text>.html</xsl:text>
+ </xsl:attribute>
+ <xsl:value-of select="refentrytitle"/><xsl:text>(</xsl:text><xsl:value-of select="manvolnum"/><xsl:text>)</xsl:text>
+ </xsl:element>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template match="refentry/refnamediv">
+ <xsl:element name="listitem">
+ <xsl:element name="para">
+ <xsl:value-of select="refpurpose"/><xsl:text>&#10;</xsl:text>
+ </xsl:element>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template match="@*|node()">
+ <xsl:apply-templates/>
+ </xsl:template>
+</xsl:stylesheet>