From 011faa0c68cf0c628ef581193166e9ac9bf22b71 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 16 Nov 2012 10:35:33 +0100 Subject: [PATCH] Improve parsing of the GIT revision number. * configure.ac (mmm4_revision): Use git rev-parse. --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 0241a9d6a..90c77faaa 100644 --- a/configure.ac +++ b/configure.ac @@ -31,8 +31,8 @@ m4_define([mym4_version], [2.1.0]) # the decimalized short revision number, a beta version string and a # flag indicating a development version (mym4_isgit). Note that the # m4 processing is done by autoconf and not during the configure run. -m4_define([mym4_revision], m4_esyscmd([git branch -v 2>/dev/null \ - | awk '/^\* / {printf "%s",$3}'])) +m4_define([mym4_revision], + m4_esyscmd([git rev-parse --short HEAD | tr -d '\n\r'])) m4_define([mym4_revision_dec], m4_esyscmd_s([echo $((0x$(echo ]mym4_revision[|head -c 4)))])) m4_define([mym4_betastring],