From bb87198622e2bcb492b5b10927a3dc9a70a7951d Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Fri, 27 Apr 2012 23:56:20 +0200 Subject: [PATCH] Add a version suffix. For development snapshots, a 'devel' suffix is added to distinguish from the final release. If necessary, the suffix can also be used for 'alpha' and 'beta' releases. --- configure.ac | 5 ++++- src/version.h.in | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index ecf1d4f..75c1049 100644 --- a/configure.ac +++ b/configure.ac @@ -2,6 +2,8 @@ m4_define([dc_version_major],[0]) m4_define([dc_version_minor],[2]) m4_define([dc_version_micro],[0]) +m4_define([dc_version_suffix],[devel]) +m4_define([dc_version],dc_version_major.dc_version_minor.dc_version_micro[]m4_ifdef([dc_version_suffix],-[dc_version_suffix])) # Libtool versioning. m4_define([dc_version_lt_current],[0]) @@ -10,7 +12,7 @@ m4_define([dc_version_lt_age],[0]) # Initialize autoconf. AC_PREREQ([2.60]) -AC_INIT([libdivecomputer],[dc_version_major.dc_version_minor.dc_version_micro]) +AC_INIT([libdivecomputer],[dc_version]) AC_CONFIG_SRCDIR([config.h.in]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) @@ -76,6 +78,7 @@ AC_CHECK_HEADERS([IOKit/serial/ioss.h]) AC_CHECK_FUNCS([localtime_r gmtime_r]) # Versioning. +AC_SUBST([DC_VERSION],[dc_version]) AC_SUBST([DC_VERSION_MAJOR],[dc_version_major]) AC_SUBST([DC_VERSION_MINOR],[dc_version_minor]) AC_SUBST([DC_VERSION_MICRO],[dc_version_micro]) diff --git a/src/version.h.in b/src/version.h.in index 5e64e01..6ac63d4 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -26,7 +26,7 @@ extern "C" { #endif /* __cplusplus */ -#define DC_VERSION "@DC_VERSION_MAJOR@.@DC_VERSION_MINOR@.@DC_VERSION_MICRO@" +#define DC_VERSION "@DC_VERSION@" #define DC_VERSION_MAJOR @DC_VERSION_MAJOR@ #define DC_VERSION_MINOR @DC_VERSION_MINOR@ #define DC_VERSION_MICRO @DC_VERSION_MICRO@