[shotwell/wip/autotools: 5/27] Add GIT version handling
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell/wip/autotools: 5/27] Add GIT version handling
- Date: Tue, 28 Jun 2016 22:48:40 +0000 (UTC)
commit cdd332a344ddc0d7bfdefd4fdc41e35045ff8cb8
Author: Jens Georg <mail jensge org>
Date: Tue May 24 23:46:42 2016 +0200
Add GIT version handling
Signed-off-by: Jens Georg <mail jensge org>
Makefile.am | 5 +++++
configure.ac | 4 ++++
2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 843df38..7b6032c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -54,6 +54,11 @@ shotwell_VALAFLAGS = --pkg gio-2.0 --pkg gtk+-3.0 --pkg gee-0.8 \
-g --enable-checking --target-glib=2.32 --thread --fatal-warnings \
--enable-experimental --enable-deprecated
+if IS_GITVERSION
+shotwell_CFLAGS += -D_GIT_VERSION='"@GITVER@"'
+shotwell_VALAFLAGS += --define=_GITVERSION
+endif
+
shotwell_SOURCES = \
src/unit/Unit.vala \
src/util/Util.vala \
diff --git a/configure.ac b/configure.ac
index 2ab8976..b681365 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,6 +13,8 @@ m4_define([api_version],[major_version])
AX_IS_RELEASE([micro-version])
+m4_define([git_version],[m4_esyscmd(git rev-parse HEAD)])
+
dnl ***********************************************************************
dnl Initialize autoconf
dnl ***********************************************************************
@@ -33,6 +35,8 @@ AC_SUBST([MINOR_VERSION],minor_version)
AC_SUBST([MICRO_VERSION],micro_version)
AC_SUBST([API_VERSION],api_version)
+AC_SUBST([GITVER],git_version)
+AM_CONDITIONAL([IS_GITVERSION],[test "x$GITVER" != "x"])
dnl ***********************************************************************
dnl Initialize automake
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]