[65839] branches/new-help-system/base/doc

raimue at macports.org raimue at macports.org
Thu Apr 1 18:05:17 PDT 2010


Revision: 65839
          http://trac.macports.org/changeset/65839
Author:   raimue at macports.org
Date:     2010-04-01 18:05:16 -0700 (Thu, 01 Apr 2010)
Log Message:
-----------
Use asciidoc and xsltproc. This enables reference listings in the man page.
Unfortunately this is not possible with a2x as it hardcodes the xsl stylesheet.

Modified Paths:
--------------
    branches/new-help-system/base/doc/Makefile

Added Paths:
-----------
    branches/new-help-system/base/doc/manpage.xsl

Modified: branches/new-help-system/base/doc/Makefile
===================================================================
--- branches/new-help-system/base/doc/Makefile	2010-04-02 01:03:17 UTC (rev 65838)
+++ branches/new-help-system/base/doc/Makefile	2010-04-02 01:05:16 UTC (rev 65839)
@@ -1,4 +1,8 @@
-A2X=		a2x
+ASCIIDOC=	${prefix}/bin/asciidoc
+ASCIIDOCFLAGS=	-f asciidoc.conf
+XSLTPROC=	${prefix}/xsltproc
+XSLTFLAGS=	-nonet
+
 MAN1=		port.1 \
 		port-activate.1 \
 		port-deactivate.1 \
@@ -42,21 +46,14 @@
 %.7.gz: %.7
 	gzip -c $^ > $@
 
-%.1 %.1.xml: %.1.txt
-	$(A2X) --asciidoc-opts='-f asciidoc.conf' --xsltproc-opts='-o $@' -f manpage $<
+%.xml: %.txt
+	$(ASCIIDOC) $(ASCIIDOCFLAGS) -d manpage -b docbook $<
 
-%.5 %.5.xml: %.5.txt
-	$(A2X) --asciidoc-opts='-f asciidoc.conf' -f manpage $<
+%: %.xml manpage.xsl
+	$(XSLTPROC) $(XSLTFLAGS) manpage.xsl $<
 
-%.7 %.7.xml: %.7.txt
-	$(A2X) --asciidoc-opts='-f asciidoc.conf' -f manpage $<
-
-%.1.html: %.1.txt
-%.5.html: %.5.txt
-%.5.html: %.5.txt
-
 %.html: %.txt
-	$(A2X) --asciidoc-opts='-f asciidoc.conf' -f xhtml $<
+	$(ASCIIDOC) $(ASCIIDOCFLAGS) -d manpage -b xhtml11 $<
 
 install: all
 	$(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}

Added: branches/new-help-system/base/doc/manpage.xsl
===================================================================
--- branches/new-help-system/base/doc/manpage.xsl	                        (rev 0)
+++ branches/new-help-system/base/doc/manpage.xsl	2010-04-02 01:05:16 UTC (rev 65839)
@@ -0,0 +1,16 @@
+<?xml version='1.0' ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"/>
+
+<xsl:param name="man.base.url.for.relative.links">http://guide.macports.org/</xsl:param>
+
+<xsl:template match="literal">
+	<xsl:value-of select="$git.docbook.backslash"/>
+	<xsl:text>fB</xsl:text>
+	<xsl:apply-templates/>
+	<xsl:value-of select="$git.docbook.backslash"/>
+	<xsl:text>fR</xsl:text>
+</xsl:template>
+
+</xsl:stylesheet>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100401/892946c9/attachment.html>


More information about the macports-changes mailing list