From aa8e27172fb82d93cdec04fc41976bfabd665f3d Mon Sep 17 00:00:00 2001 From: Erwin Janssen Date: Fri, 10 Jun 2016 14:46:30 +0200 Subject: [PATCH] Added GRAPHVIZ_VERSION_COMMIT to autogen.sh There are a few places in autogen.sh and configure.ac where a value called GRAPHVIZ_VERSION_COMMIT is used. However this value was set to unknown in autogen.sh. This commit solved this assigning the abbreviated hash of last commit to this value. --- autogen.sh | 9 ++++++--- configure.ac | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/autogen.sh b/autogen.sh index c437ee9c3..5b9ad0957 100755 --- a/autogen.sh +++ b/autogen.sh @@ -10,12 +10,15 @@ else echo "Warning: we do not know how to invoke date correctly." >&2 fi fi - echo "Graphviz version date is based on time of last commit: $GRAPHVIZ_VERSION_DATE" + echo "Graphviz: version date is based on time of last commit: $GRAPHVIZ_VERSION_DATE" + + GRAPHVIZ_VERSION_COMMIT=$( git log -n 1 --format=%h ) + echo "Graphviz: abbreviated hash of last commit: $GRAPHVIZ_VERSION_COMMIT" fi # initialize version for a "stable" build cat >./version.m4 < unstable series dnl even => stable series dnl For the micro number: 0 => in-progress development @@ -26,7 +29,7 @@ dnl NB: the next line gets changed to a date/time string for development release m4_define(graphviz_version_micro, $GRAPHVIZ_VERSION_DATE) m4_define(graphviz_version_date, $GRAPHVIZ_VERSION_DATE) m4_define(graphviz_collection, test) -m4_define(graphviz_version_commit, unknown) +m4_define(graphviz_version_commit, $GRAPHVIZ_VERSION_COMMIT) EOF # attempt to suppress ar messages for 'u' when 'D' present. diff --git a/configure.ac b/configure.ac index 7afaa0950..7396bfcf0 100644 --- a/configure.ac +++ b/configure.ac @@ -4,6 +4,9 @@ # Try to use version available on FC8 AC_PREREQ(2.61) +dnl =========================================================================== +dnl Set Graphviz version information + # set: # graphviz_version_major # graphviz_version_minor @@ -19,13 +22,13 @@ GRAPHVIZ_VERSION_MAJOR=graphviz_version_major() GRAPHVIZ_VERSION_MINOR=graphviz_version_minor() GRAPHVIZ_VERSION_MICRO=graphviz_version_micro() -#NB: "stable" or "development" +# NB: "stable" or "development" GRAPHVIZ_COLLECTION=graphviz_collection() -#NB: date/time of last commit - or "0" +# NB: date/time of last commit - or "0" GRAPHVIZ_VERSION_DATE=graphviz_version_date() -#NB: git commit hash of last commit +# NB: git commit hash of last commit GRAPHVIZ_VERSION_COMMIT=graphviz_version_commit() GRAPHVIZ_SOURCES=graphviz/$GRAPHVIZ_COLLECTION/SOURCES -- 2.50.1