Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <gerwitm@lovullo.com>2016-08-23 11:23:04 -0400
committerMike Gerwitz <gerwitm@lovullo.com>2016-08-23 11:23:04 -0400
commita6984c990912d57d980c8f955d77f2701510ffe7 (patch)
tree8449bb1a6191a91b2398e9ee7a4b64d30ab4399f
parent183fed3ae10b9e68b5d50fb4ce3fc41877aed01f (diff)
downloadtame-a6984c990912d57d980c8f955d77f2701510ffe7.tar.gz
tame-a6984c990912d57d980c8f955d77f2701510ffe7.tar.bz2
tame-a6984c990912d57d980c8f955d77f2701510ffe7.zip
Add TAME version output to conf.xsl
* conf.xsl.in (tame:version{,-major,-minor,-rev,-suffix}: Added. * configure.ac (VERSION, MAJOR, MINOR, REV, SUFFIX): Added.
-rw-r--r--conf.xsl.in24
-rw-r--r--configure.ac12
2 files changed, 31 insertions, 5 deletions
diff --git a/conf.xsl.in b/conf.xsl.in
index 22ed9d8..c5fcde5 100644
--- a/conf.xsl.in
+++ b/conf.xsl.in
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<!--
- General configuration
+ General configuration and version information
- Copyright (C) 2015 LoVullo Associates, Inc.
+ Copyright (C) 2015, 2016 LoVullo Associates, Inc.
This file is part of TAME.
@@ -21,9 +21,23 @@
<http://www.gnu.org/licenses/>.
-->
<stylesheet version="2.0"
- xmlns="http://www.w3.org/1999/XSL/Transform">
+ xmlns="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:tame="http://www.lovullo.com/tame">
-<!-- hoxsl path is configured at build time -->
-<import href="@HOXSL@/apply/thrush.xsl" />
+ <variable name="tame:version" as="xs:string"
+ select="@VERSION@" />
+
+ <variable name="tame:version-major" as="xs:string"
+ select="@MAJOR@" />
+ <variable name="tame:version-minor" as="xs:string"
+ select="@MINOR@" />
+ <variable name="tame:version-rev" as="xs:string"
+ select="@REV@" />
+ <variable name="tame:version-suffix" as="xs:string"
+ select="@SUFFIX@" />
+
+ <!-- hoxsl path is configured at build time -->
+ <import href="@HOXSL@/apply/thrush.xsl" />
</stylesheet>
diff --git a/configure.ac b/configure.ac
index 432be62..bb33c5d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,6 +20,18 @@ AC_INIT([tame], [0.0.0], [dev@lovullo.com])
AC_CONFIG_AUX_DIR([tools])
AM_INIT_AUTOMAKE([foreign])
+# provide more granular version numbers based on the version string, using
+# the format MAJOR.MINOR.REV[-SUFFIX], where SUFFIX can itself contain
+# dashes (and often will)
+m4_define([ver_split],
+ m4_split(
+ patsubst(AC_PACKAGE_VERSION, [^\([^-]+\)-], [\1.]),
+ [\.]))
+AC_SUBST(MAJOR, m4_argn(1, ver_split))
+AC_SUBST(MINOR, m4_argn(2, ver_split))
+AC_SUBST(REV, m4_argn(3, ver_split))
+AC_SUBST(SUFFIX, m4_argn(4, ver_split))
+
AC_ARG_VAR([JAVA], [The Java executable])
AC_CHECK_PROGS(JAVA, [java])