[38034] trunk/doc-new
raimue at macports.org
raimue at macports.org
Thu Jul 3 17:37:00 PDT 2008
Revision: 38034
http://trac.macosforge.org/projects/macports/changeset/38034
Author: raimue at macports.org
Date: 2008-07-03 17:37:00 -0700 (Thu, 03 Jul 2008)
Log Message:
-----------
doc-new:
Use macports.xsl.in as a template for macports.xsl
Now the PREFIX has only to be changed in the Makefile if your MacPorts
installation is not at /opt/local
Modified Paths:
--------------
trunk/doc-new/Makefile
Added Paths:
-----------
trunk/doc-new/man/resources/macports.xsl.in
Removed Paths:
-------------
trunk/doc-new/man/resources/macports.xsl
Property Changed:
----------------
trunk/doc-new/man/resources/
Modified: trunk/doc-new/Makefile
===================================================================
--- trunk/doc-new/Makefile 2008-07-03 23:49:00 UTC (rev 38033)
+++ trunk/doc-new/Makefile 2008-07-04 00:37:00 UTC (rev 38034)
@@ -4,10 +4,8 @@
# The ports 'docbook-xsl', 'docbook-xml' and 'libxslt' have to be
# installed.
-# If your macports isn't installed in /opt/local you have to change PREFIX
-# here and update man/resources/macports.xsl to use your port installation!
+# If your macports isn't installed in /opt/local you have to change PREFIX here
-
# prefix of the macports installation:
PREFIX = /opt/local
@@ -68,7 +66,7 @@
# The portfile-*.xml files in $(GUIDE-SRC) are copied to $(MAN-TMP) and
# modified (section -> refsection) so they can be used as man xml source files
# and then xincluded in the real man xml files in $(MAN-SRC).
-man:
+man: $(MAN-XSL)
$(MKDIR) -p $(MAN-RESULT)
$(MKDIR) -p $(MAN-TMP)
$(CP) $(GUIDE-SRC)/portfile-*.xml $(MAN-TMP)
@@ -82,11 +80,16 @@
$(MAN-SRC)/porthier.7.xml
$(RM) -r $(MAN-TMP)
+# create XSL from template for man pages
+$(MAN-XSL):
+ $(SED) 's:@PREFIX@:$(PREFIX):' $@.in > $@
+
# Remove all temporary files generated by guide: and man:.
clean:
$(RM) -rf $(GUIDE-RESULT)
$(RM) -rf $(MAN-RESULT)
$(RM) -rf $(MAN-TMP)
+ $(RM) -rf $(MAN-XSL)
$(RM) -f guide.tmp.xml
# Validate the xml files for the guide.
Property changes on: trunk/doc-new/man/resources
___________________________________________________________________
Name: svn:ignore
+ macports.xsl
Deleted: trunk/doc-new/man/resources/macports.xsl
===================================================================
--- trunk/doc-new/man/resources/macports.xsl 2008-07-03 23:49:00 UTC (rev 38033)
+++ trunk/doc-new/man/resources/macports.xsl 2008-07-04 00:37:00 UTC (rev 38034)
@@ -1,54 +0,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-<!-- load the man page xsl file so it can be modified: -->
-<!-- if your macports prefix differs you have to change this path -->
-<xsl:import href="/opt/local/share/xsl/docbook-xsl/manpages/docbook.xsl"/>
-
-<!-- modify the default term template so terms are bold: -->
-<!-- only text between MODIFIED START and STOP is modified -->
-<!-- everything else is just copied from the manpage xsl -->
-<xsl:template match="varlistentry|glossentry">
- <xsl:text>⌂PP </xsl:text>
- <xsl:for-each select="term|glossterm">
- <xsl:variable name="content">
- <!-- MODIFIED START -->
- <!-- mark terms bold: -->
- <xsl:apply-templates mode="bold" select="."/>
- <!-- this is the default code here which was changed: -->
- <!-- <xsl:apply-templates/> -->
- <!-- MODIFIED STOP -->
- </xsl:variable>
- <xsl:value-of select="normalize-space($content)"/>
- <xsl:choose>
- <xsl:when test="position() = last()"/> <!-- do nothing -->
- <xsl:otherwise>
- <!-- * if we have multiple terms in the same varlistentry, generate -->
- <!-- * a separator (", " by default) and/or an additional line -->
- <!-- * break after each one except the last -->
- <!-- * -->
- <!-- * note that it is not valid to have multiple glossterms -->
- <!-- * within a glossentry, so this logic never gets exercised -->
- <!-- * for glossterms (every glossterm is always the last in -->
- <!-- * its parent glossentry) -->
- <xsl:value-of select="$variablelist.term.separator"/>
- <xsl:if test="not($variablelist.term.break.after = '0')">
- <xsl:text> </xsl:text>
- <xsl:text>⌂br </xsl:text>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- <xsl:text> </xsl:text>
- <xsl:text>⌂RS</xsl:text>
- <xsl:if test="not($list-indent = '')">
- <xsl:text> </xsl:text>
- <xsl:value-of select="$list-indent"/>
- </xsl:if>
- <xsl:text> </xsl:text>
- <xsl:apply-templates/>
- <xsl:text>⌂RE </xsl:text>
-</xsl:template>
-
-</xsl:stylesheet>
Copied: trunk/doc-new/man/resources/macports.xsl.in (from rev 38026, trunk/doc-new/man/resources/macports.xsl)
===================================================================
--- trunk/doc-new/man/resources/macports.xsl.in (rev 0)
+++ trunk/doc-new/man/resources/macports.xsl.in 2008-07-04 00:37:00 UTC (rev 38034)
@@ -0,0 +1,54 @@
+<?xml version='1.0'?>
+<xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- load the man page xsl file so it can be modified: -->
+<!-- @PREFIX@ is replaced by the prefix of your MacPorts installation -->
+<xsl:import href="@PREFIX@/share/xsl/docbook-xsl/manpages/docbook.xsl"/>
+
+<!-- modify the default term template so terms are bold: -->
+<!-- only text between MODIFIED START and STOP is modified -->
+<!-- everything else is just copied from the manpage xsl -->
+<xsl:template match="varlistentry|glossentry">
+ <xsl:text>⌂PP </xsl:text>
+ <xsl:for-each select="term|glossterm">
+ <xsl:variable name="content">
+ <!-- MODIFIED START -->
+ <!-- mark terms bold: -->
+ <xsl:apply-templates mode="bold" select="."/>
+ <!-- this is the default code here which was changed: -->
+ <!-- <xsl:apply-templates/> -->
+ <!-- MODIFIED STOP -->
+ </xsl:variable>
+ <xsl:value-of select="normalize-space($content)"/>
+ <xsl:choose>
+ <xsl:when test="position() = last()"/> <!-- do nothing -->
+ <xsl:otherwise>
+ <!-- * if we have multiple terms in the same varlistentry, generate -->
+ <!-- * a separator (", " by default) and/or an additional line -->
+ <!-- * break after each one except the last -->
+ <!-- * -->
+ <!-- * note that it is not valid to have multiple glossterms -->
+ <!-- * within a glossentry, so this logic never gets exercised -->
+ <!-- * for glossterms (every glossterm is always the last in -->
+ <!-- * its parent glossentry) -->
+ <xsl:value-of select="$variablelist.term.separator"/>
+ <xsl:if test="not($variablelist.term.break.after = '0')">
+ <xsl:text> </xsl:text>
+ <xsl:text>⌂br </xsl:text>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ <xsl:text> </xsl:text>
+ <xsl:text>⌂RS</xsl:text>
+ <xsl:if test="not($list-indent = '')">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$list-indent"/>
+ </xsl:if>
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>⌂RE </xsl:text>
+</xsl:template>
+
+</xsl:stylesheet>
Property changes on: trunk/doc-new/man/resources/macports.xsl.in
___________________________________________________________________
Name: svn:mergeinfo
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080703/62fb94db/attachment.html
More information about the macports-changes
mailing list