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.
This commit is contained in:
Jef Driesen 2012-04-27 23:56:20 +02:00
parent 53b4a1c225
commit fa54a55a89
2 changed files with 5 additions and 2 deletions

View File

@ -2,6 +2,8 @@
m4_define([dc_version_major],[0])
m4_define([dc_version_minor],[1])
m4_define([dc_version_micro],[1])
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])

View File

@ -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@