From 0e45cdf62422fbcc69c10d4287c7f8a2f96c149d Mon Sep 17 00:00:00 2001 From: Bryan Hundven Date: Wed, 3 Jun 2015 11:08:57 -0700 Subject: [PATCH] autoconf: Update version numbering This change removes the static .version file, and moves to using the git tag as the version number, the change number if the current commit is newer then the latest tag, and '-dirty' if there are changes to the git repository since the last commit that are uncommitted. This helps us in the troubleshooting process to identify if the user is: * using a released version (i.e.: 1.21.0) * using a clone from git (i.e.: 1.21.0-29-13e14f) * using a clone from git with local uncommitted changes (i.e.: 1.21.0-29-13e14f-dirty) Signed-off-by: Bryan Hundven Acked-by: "Yann E. MORIN" --- .version | 1 - configure.ac | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) delete mode 100644 .version diff --git a/.version b/.version deleted file mode 100644 index 3500250a..00000000 --- a/.version +++ /dev/null @@ -1 +0,0 @@ -1.21.0 diff --git a/configure.ac b/configure.ac index 9899a3bd..573d0b9a 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,10 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.67]) -AC_INIT([crosstool-NG], [m4_esyscmd_s([cat .version])], [crossgcc@sourceware.org]) +AC_INIT( + [crosstool-NG], + [m4_esyscmd_s([git describe --always --dirty])], + [crossgcc@sourceware.org]) AC_CONFIG_AUX_DIR([scripts]) #--------------------------------------------------------------------