distrib: all $(DISTRIB_DEPENDS) $(NEWSFILE)
endif
-release: distrib $(RELEASE_DEPENDS)
+release: distrib $(RELEASE_DEPENDS) tag
#newversion:
#ifeq ($(CVSCHECK),)
endif
ifeq ($(OFFLINE),yes)
-zip:
+zip: tag
else
zip: ChangeHistory.xml.zip
endif
announce: RELEASE-NOTES-PARTIAL.txt
$(RELEASE_ANNOUNCE) $(RELVER) $(ANNOUNCE_RECIPIENTS)
+tag:
+ if [ -z "$(svn status)" ]; \
+ then echo "$(SVN) $(SVN_OPTS) delete $(REPOSITORY_ROOT)/tags/$(TAG)/$(DISTRO)"; \
+ echo "$(SVN) $(SVN_OPTS) copy -r $(REVISION) $(DISTRO_URL) $(REPOSITORY_ROOT)/tags/$(TAG)/$(DISTRO)"; \
+ else \
+ echo "Unversioned or uncommitted files found. Before making the"; \
+ echo "zip target, either delete the following files, add them to"; \
+ echo "the repository, or add them to the svn:ignore properties for"; \
+ echo "their parent directories."; \
+ fi
+
release-clean: clean
$(MAKE) -C docsrc release-clean
$(RM) TERMS.xml
SVN_INFO_FILE=.svninfo.xml
-PREVIOUS_RELEASE=$(shell $(XSLTPROC) --stringparam param 'PreviousRelease' $(GETPARAM) VERSION)
+PREVIOUS_RELEASE=$(shell $(XSLTPROC) --stringparam get PreviousRelease VERSION VERSION)
-REPOSITORY_ROOT=$(shell $(XSLTPROC) --stringparam element root $(GETELEMENT) $(SVN_INFO_FILE))
-DISTRO_URL=$(shell $(XSLTPROC) --stringparam element url $(GETELEMENT) $(SVN_INFO_FILE))
+REPOSITORY_ROOT=$(shell $(XSLTPROC) --stringparam expression //root $(EVALXPATH) $(SVN_INFO_FILE))
+DISTRO_URL=$(shell $(XSLTPROC) --stringparam expression //url $(EVALXPATH) $(SVN_INFO_FILE))
+REVISION=$(shell $(XSLTPROC) --stringparam expression //commit@revision $(EVALXPATH) $(SVN_INFO_FILE))
DISTRO_PARENT_URL=$(dir $(basename $(DISTRO_URL)))
# stylesheet for stripping DB5 namespace
# file containing "What's New" info generated from Subversion log
NEWSFILE=NEWS
-PREVIOUS_REVISION=$(shell $(XSLTPROC) --stringparam param 'PreviousReleaseRevision' $(GETPARAM) VERSION)
+PREVIOUS_REVISION=$(shell $(XSLTPROC) --stringparam get PreviousReleaseRevision VERSION VERSION)
+
+TAG=$(shell $(XSLTPROC) --stringparam get Tag VERSION VERSION)
# determine RELVER automatically by:
#
XSLTPROC=xsltproc
XSLTPROC_OPTS=
-GETPARAM=$(DOCBOOK_SVN)/releasetools/get-param.xsl
-GETELEMENT=$(DOCBOOK_SVN)/releasetools/get-element.xsl
+EVALXPATH=$(DOCBOOK_SVN)/releasetools/eval-xpath.xsl
XMLLINT=xmllint
XMLLINT_OPTS=--noent
--- /dev/null
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:sf="http://sourceforge.net/"
+ xmlns:dyn="http://exslt.org/dynamic"
+ version='1.0'>
+ <!-- ********************************************************************
+ $Id$
+ ******************************************************************** -->
+
+ <xsl:output method="text"/>
+ <xsl:param name="expression"/>
+
+ <xsl:template match="/">
+ <xsl:choose>
+ <!-- * xsltproc and Xalan both support dyn:evaluate() -->
+ <xsl:when test="function-available('dyn:evaluate')">
+ <xsl:value-of select="dyn:evaluate($expression)"/>
+ </xsl:when>
+ <!-- * Saxon has its own evaluate() & doesn't support dyn:evaluate() -->
+ <xsl:when test="function-available('saxon:evaluate')">
+ <xsl:value-of select="saxon:evaluate($expression)"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:template>
+
+</xsl:stylesheet>
+++ /dev/null
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version='1.0'>
- <!-- ********************************************************************
- $Id$
- ******************************************************************** -->
-
- <xsl:output method="text"/>
- <xsl:param name="element"/>
-
- <xsl:template match="/">
- <xsl:value-of select="//*[local-name() = $element]"/>
- </xsl:template>
-
-</xsl:stylesheet>
+++ /dev/null
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version='1.0'>
- <!-- ********************************************************************
- $Id$
- ******************************************************************** -->
-
- <xsl:output method="text"/>
- <xsl:param name="param"/>
-
- <xsl:template match="/">
- <xsl:param name="target" select="//*[@*[local-name() = 'name'] = $param]"/>
- <xsl:choose>
- <!-- * if param contains ': ', it's an RCS keyword like -->
- <!-- * '$Revision$', we want to get the part after the -->
- <!-- * opening ': ' and before the closing ' $' delimiters -->
- <xsl:when test="contains($target, ': ')">
- <xsl:value-of select="substring-before(substring-after($target, ': '), ' $')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$target"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-</xsl:stylesheet>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fm="http://freshmeat.net/projects/freshmeat-submit/"
xmlns:sf="http://sourceforge.net/"
+ xmlns:dyn="http://exslt.org/dynamic"
+ xmlns:saxon="http://icl.com/saxon"
exclude-result-prefixes="fm sf"
version='1.0'>
+<xsl:output omit-xml-declaration="yes"/>
+
+<xsl:param name="get"/>
<xsl:param name="VERSION" select="string(document('')//fm:Version[1])"/>
+<xsl:param name="Tag" select="concat('V',translate(string(document('')//fm:Version[1]),'.',''))"/>
<xsl:param name="DistroTitle" select="string(document('')//fm:Branch[1])"/>
<xsl:param name="DistroName">docbook-xsl</xsl:param>
<xsl:param name="PreviousRelease">1.72.0</xsl:param>
</fm:project>
<xsl:template match="/" priority="-100">
- <xsl:if test="$sf-relid = 0">
- <xsl:message terminate="yes">
- <xsl:text>You must specify the sf-relid as a parameter.</xsl:text>
- </xsl:message>
- </xsl:if>
-
- <xsl:apply-templates select="//fm:project"/>
+ <xsl:choose>
+ <xsl:when test="$get = 'Tag'">
+ <xsl:value-of select="$Tag"/>
+ </xsl:when>
+ <xsl:when test="$get = 'PreviousRelease'">
+ <xsl:value-of select="$PreviousRelease"/>
+ </xsl:when>
+ <xsl:when test="$get = 'PreviousReleaseRevision'">
+ <xsl:value-of select="$PreviousReleaseRevision"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="$sf-relid = 0">
+ <xsl:message terminate="yes">
+ <xsl:text>You must specify the sf-relid as a parameter.</xsl:text>
+ </xsl:message>
+ </xsl:if>
+ <xsl:apply-templates select="//fm:project"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<xsl:template match="fm:project">