summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut2008-11-04 14:58:22 +0000
committerPeter Eisentraut2008-11-04 14:58:22 +0000
commit3dd9bb7df11e751d682cbaa99517e0e63f97e939 (patch)
tree8e69acfd3747d68a69630c8d48b700fde3551363
parent14801a87769d312dbae1aa0f3552e46c3a804697 (diff)
Experimental new support for building man pages via docbook2x, an XSL-based
tool chain. With some polishing, this might help us get rid of our ancient and crufty man page build mechanism.
-rw-r--r--doc/src/sgml/Makefile14
-rw-r--r--doc/src/sgml/stylesheet-man.xsl16
2 files changed, 30 insertions, 0 deletions
diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile
index 9974796498..d4604e596e 100644
--- a/doc/src/sgml/Makefile
+++ b/doc/src/sgml/Makefile
@@ -270,6 +270,20 @@ MAKEINFO = makeinfo
##
+## Experimental man page building through docbook2x
+##
+
+# called docbook2man on non-Debian
+DOCBOOK2MAN = docbook2x-man
+
+manx: postgres.xml stylesheet-man.xsl
+ $(DOCBOOK2MAN) -s $(srcdir)/stylesheet-man.xsl --string-param default-manpage-section=$(DEFAULTSECTION) $<
+ $(mkinstalldirs) man1 man$(DEFAULTSECTION)
+ mv *.1 man1/
+ mv *.$(DEFAULTSECTION) man$(DEFAULTSECTION)/
+
+
+##
## Check
##
diff --git a/doc/src/sgml/stylesheet-man.xsl b/doc/src/sgml/stylesheet-man.xsl
new file mode 100644
index 0000000000..2d37a42f1a
--- /dev/null
+++ b/doc/src/sgml/stylesheet-man.xsl
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+<xsl:import href="http://docbook2x.sourceforge.net/latest/xslt/man/docbook.xsl"/>
+
+<!--
+ Man pages don't really support a third section level, but this
+ makes our man pages work OK and matches the behavior of the sgmlspl
+ style.
+ -->
+<xsl:template match="refsect3">
+ <xsl:call-template name="SS-section" />
+</xsl:template>
+
+</xsl:stylesheet>