commit f9f7934654d7758d1a315e7af9e62740a2bd627d
parent 79c5de0172174aa0248edd1e399fc25f6668fd1e
Author: Ricardo Mones <ricardo@mones.org>
Date: Thu, 21 Mar 2013 01:32:39 +0100
Fix build of 'make dist' generated tarballs
The version is set in stone before the 'make dist' run.
In the cases where no .git directory is found, like generated
tarballs, the stone is summoned instead.
Diffstat:
4 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -489,3 +489,4 @@
/TAGS
/tools/Makefile
/tools/Makefile.in
+/version
diff --git a/Makefile.am b/Makefile.am
@@ -15,7 +15,9 @@ EXTRA_DIST = \
claws-mail.desktop \
claws-mail.png \
autogen.sh \
- claws-features.h.in
+ claws-features.h.in \
+ version.in \
+ version
# hicolor icon theme, base class of all icon themes
pixmapdir=$(datadir)/icons/hicolor/48x48/apps
diff --git a/configure.ac b/configure.ac
@@ -12,7 +12,11 @@ BINARY_AGE=0
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
-GIT_VERSION=`git describe --abbrev=6 --dirty --always`
+if test \( -d .git \); then
+ GIT_VERSION=`git describe --abbrev=6 --dirty --always`
+else
+ GIT_VERSION=`sh -c '. ./version'`
+fi
MAJOR_VERSION=`echo $GIT_VERSION | awk -F. '{print $1}'`
MINOR_VERSION=`echo $GIT_VERSION | awk -F. '{print $2}'`
MICRO_VERSION=`echo $GIT_VERSION | awk -F- '{print $1}' | awk -F. '{print $3}'`
@@ -1892,6 +1896,7 @@ manual/de/dist/ps/Makefile
manual/de/dist/html/Makefile
manual/de/dist/txt/Makefile
claws-mail.pc
+version
])
dnl Output the configuration summary
diff --git a/version.in b/version.in
@@ -0,0 +1 @@
+echo "@GIT_VERSION@"