From: Mathieu Desnoyers Date: Mon, 5 Aug 2013 19:23:27 +0000 (-0400) Subject: build: export major/minor/patchlevel numbers X-Git-Tag: v2.3.0-rc3~63 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=81265501f5370482b1ee9c24d3fa6537c5ca0389;p=lttng-tools.git build: export major/minor/patchlevel numbers Acked-by: Julien Desfossez Signed-off-by: Mathieu Desnoyers --- diff --git a/configure.ac b/configure.ac index 2f71a60bb..32efa9357 100644 --- a/configure.ac +++ b/configure.ac @@ -6,6 +6,18 @@ AC_CONFIG_MACRO_DIR([config]) AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) +# Compute minor/major/patchlevel version numbers +AC_PROG_SED +major_version=$(echo AC_PACKAGE_VERSION | sed 's/^\([[0-9]]\)*\.[[0-9]]*\.[[0-9]]*.*$/\1/') +minor_version=$(echo AC_PACKAGE_VERSION | sed 's/^[[0-9]]*\.\([[0-9]]*\)\.[[0-9]]*.*$/\1/') +patchlevel_version=$(echo AC_PACKAGE_VERSION | sed 's/^[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\).*$/\1/') +AC_SUBST([MAJOR_VERSION], [$major_version]) +AC_SUBST([MINOR_VERSION], [$minor_version]) +AC_SUBST([PATCHLEVEL_VERSION], [$patchlevel_version]) +AC_DEFINE_UNQUOTED([VERSION_MAJOR], $major_version, [UST major version number]) +AC_DEFINE_UNQUOTED([VERSION_MINOR], $minor_version, [UST minor version number]) +AC_DEFINE_UNQUOTED([VERSION_PATCHLEVEL], $patchlevel_version, [UST patchlevel version number]) + version_name="Dominus Vobiscum" version_description="A very succulent line-up of beers brewed at Microbrasserie Charlevoix. Elaborated starting from special malts and fermented with a Belgian yeast. These beers are refermented in bottle and will make you discover the richness of wheat, amber and triple styles."