[PATCH 2/2] build: embed the git commit id of HEAD in the configure script
Thomas Haller
thaller at redhat.com
Fri Jul 4 10:58:04 PDT 2014
Signed-off-by: Thomas Haller <thaller at redhat.com>
---
configure.ac | 2 ++
1 file changed, 2 insertions(+)
diff --git a/configure.ac b/configure.ac
index e469a77..f0fbed7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,6 +14,7 @@
m4_define([libnl_major_version], [3])
m4_define([libnl_minor_version], [2])
m4_define([libnl_micro_version], [25])
+m4_define([libnl_git_sha], [m4_esyscmd([ ( [ -d ./.git/ ] && [ "$(readlink -f ./.git/)" = "$(readlink -f "$(git rev-parse --git-dir 2>/dev/null)" 2>/dev/null)" ] && git rev-parse --verify -q HEAD 2>/dev/null ) || true ])])
# The following explanation may help to understand the above rules a bit
@@ -54,6 +55,7 @@ AC_SUBST(MAJ_VERSION)
MIN_VERSION=libnl_minor_version
AC_SUBST(MIN_VERSION)
MIC_VERSION=libnl_micro_version
+LIBNL_GIT_SHA=libnl_git_sha
AC_SUBST(MIC_VERSION)
LIBNL_VERSION=libnl_version
AC_SUBST(LIBNL_VERSION)
--
1.9.3
More information about the libnl
mailing list