From 99f653189e448b3ff3f2f02ab876231d44fa1ce3 Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Mon, 30 Nov 2015 00:00:58 +0100 Subject: Computed a version number for Chrysalide using Git. --- ChangeLog | 11 +++++++++++ configure.ac | 7 ++++--- gitrev.m4 | 4 ++++ svnrev.m4 | 9 --------- 4 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 gitrev.m4 delete mode 100644 svnrev.m4 diff --git a/ChangeLog b/ChangeLog index ed92b9f..57bbdb9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +15-11-29 Cyrille Bagard + + * configure.ac: + Compute a version number for Chrysalide using Git. + + * gitrev.m4: + New entry: provide a revision number with Git like Subversion did. + + * svnrev.m4: + Deleted entry. + 15-11-27 Cyrille Bagard * src/arch/arm/v7/processor.c: diff --git a/configure.ac b/configure.ac index 1476908..5328d27 100644 --- a/configure.ac +++ b/configure.ac @@ -4,10 +4,10 @@ # Autoconf requirements ############################################################ -m4_include([svnrev.m4]) +m4_include([gitrev.m4]) AC_PREREQ(2.59) -AC_INIT([chrysalide], [svnversion], [nocbos@gmail.com]) +AC_INIT([chrysalide], [gitversion], [nocbos@gmail.com]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) @@ -365,7 +365,8 @@ AC_OUTPUT echo -echo $PACKAGE REVISION +echo -n $PACKAGE r +echo AC_PACKAGE_VERSION echo echo The GNU Image Manipulation Program Toolkit... : $libgtk_version diff --git a/gitrev.m4 b/gitrev.m4 new file mode 100644 index 0000000..e7e389c --- /dev/null +++ b/gitrev.m4 @@ -0,0 +1,4 @@ + +define([gitrepo], esyscmd([bash -c "echo -n $(( $(git rev-list HEAD | wc -l) + 4))"])) + +define([gitversion], ifelse(gitrepo, , 000, gitrepo)) diff --git a/svnrev.m4 b/svnrev.m4 deleted file mode 100644 index 311f1b7..0000000 --- a/svnrev.m4 +++ /dev/null @@ -1,9 +0,0 @@ - -define([REPO], [svn://svn.gna.org/svn/chrysalide/trunk]) - - -define([svnrepo], esyscmd([bash -c "svnversion2 | tr -cd '[0-9]'" 2> /dev/null])) - -define([onlinerepo], esyscmd(LANG=C svn info REPO | awk -v ORS= '/Revision:/ { print $2 }')) - -define([svnversion], ifelse(svnrepo, , ifelse(onlinerepo, , 000, onlinerepo), svnrepo)) -- cgit v0.11.2-87-g4458