From d55aaabac6cf26ad7d256f98c4ab7c99b360b67f Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 3 Jan 2018 17:55:59 -0500 Subject: [PATCH] citadel/configure.in extract version number from source code --- citadel/citadel.h | 10 ---------- citadel/configure.ac | 5 +++-- libcitadel/configure.in | 6 ++---- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/citadel/citadel.h b/citadel/citadel.h index 6e9e09ff3..fea62aaa2 100644 --- a/citadel/citadel.h +++ b/citadel/citadel.h @@ -35,16 +35,6 @@ extern "C" { */ #define CITADEL PACKAGE_STRING -/* - * REV_LEVEL is the current version number (multiplied by 100 to avoid having - * to fiddle with the decimal). REV_MIN is the oldest version of Citadel - * whose data files are compatible with the current version. If the data files - * are older than REV_MIN, none of the programs will work until the setup - * program is run again to bring things up to date. EXPORT_REV_MIN is the - * oldest version of Citadel whose export files we can read. The latter is - * usually more strict because you're not really supposed to dump/load and - * upgrade at the same time. - */ #define REV_LEVEL 917 // This version #define REV_MIN 591 // Oldest compatible database #define EXPORT_REV_MIN 760 // Oldest compatible export files diff --git a/citadel/configure.ac b/citadel/configure.ac index 17a525991..16ad72895 100644 --- a/citadel/configure.ac +++ b/citadel/configure.ac @@ -1,7 +1,8 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.52) -AC_INIT([Citadel], [916], [http://www.citadel.org/]) -AC_REVISION([$Revision: 5108 $]) + +AC_INIT([citadel],m4_esyscmd_s([grep REV_LEVEL citadel.h | sed 's/[^0-9]*//g'])) +AC_REVISION(m4_esyscmd_s([git log --pretty=%h | head -1]) AC_CONFIG_SRCDIR([citserver.c]) AC_CONFIG_HEADER(sysdep.h) AC_CONFIG_MACRO_DIR([m4]) diff --git a/libcitadel/configure.in b/libcitadel/configure.in index 933d19daf..178d5d183 100755 --- a/libcitadel/configure.in +++ b/libcitadel/configure.in @@ -4,9 +4,7 @@ dnl dnl Ensure that libcitadel is configured with autoconf 2.52 or newer AC_PREREQ(2.52) - -AC_INIT([libcitadel], m4_esyscmd([grep LIBCITADEL_VERSION lib/libcitadel.h | sed 's/[^0-9]*//g' ])) - +AC_INIT([libcitadel], m4_esyscmd_s([grep LIBCITADEL_VERSION lib/libcitadel.h | sed 's/[^0-9]*//g' ])) AC_CONFIG_SRCDIR(Makefile.in) AC_CONFIG_AUX_DIR(conftools) AC_CONFIG_SRCDIR(tests/Makefile.in) @@ -20,7 +18,7 @@ dnl Set LIBAGE to 0. dnl LIBCURRENT=4 -LIBREVISION=m4_esyscmd([grep LIBCITADEL_VERSION lib/libcitadel.h | sed 's/[^0-9]*//g' ]) +LIBREVISION=m4_esyscmd_s([grep LIBCITADEL_VERSION lib/libcitadel.h | sed 's/[^0-9]*//g' ]) LIBAGE=0 sinclude(conftools/libtool.m4) -- 2.30.2