Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 725ba51

Browse files
committed
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.
1 parent 254aecb commit 725ba51

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

doc/src/sgml/Makefile

+15-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# PostgreSQL documentation makefile
44
#
5-
# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.109 2008/10/31 14:35:30 petere Exp $
5+
# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.110 2008/11/04 14:58:22 petere Exp $
66
#
77
#----------------------------------------------------------------------------
88

@@ -269,6 +269,20 @@ MAKEINFO = makeinfo
269269
.SUFFIXES:
270270

271271

272+
##
273+
## Experimental man page building through docbook2x
274+
##
275+
276+
# called docbook2man on non-Debian
277+
DOCBOOK2MAN = docbook2x-man
278+
279+
manx: postgres.xml stylesheet-man.xsl
280+
$(DOCBOOK2MAN) -s $(srcdir)/stylesheet-man.xsl --string-param default-manpage-section=$(DEFAULTSECTION) $<
281+
$(mkinstalldirs) man1 man$(DEFAULTSECTION)
282+
mv *.1 man1/
283+
mv *.$(DEFAULTSECTION) man$(DEFAULTSECTION)/
284+
285+
272286
##
273287
## Check
274288
##

doc/src/sgml/stylesheet-man.xsl

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3+
version="1.0">
4+
5+
<xsl:import href="http://docbook2x.sourceforge.net/latest/xslt/man/docbook.xsl"/>
6+
7+
<!--
8+
Man pages don't really support a third section level, but this
9+
makes our man pages work OK and matches the behavior of the sgmlspl
10+
style.
11+
-->
12+
<xsl:template match="refsect3">
13+
<xsl:call-template name="SS-section" />
14+
</xsl:template>
15+
16+
</xsl:stylesheet>

0 commit comments

Comments
 (0)