diff mbox series

[v4,1/7] configure.ac: Export git commit count

Message ID 20200714055915.640438-1-paul.elder@ideasonboard.com (mailing list archive)
State New, archived
Headers show
Series [v4,1/7] configure.ac: Export git commit count | expand

Commit Message

Paul Elder July 14, 2020, 5:59 a.m. UTC
Export the git commit count from configure.ac to append to version
numbers in the various utils.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>

---
New in v4
---
 configure.ac | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/configure.ac b/configure.ac
index 36fa6ec8..b3b090f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -574,6 +574,9 @@  CPPFLAGS="-I\$(top_srcdir)/lib/include -Wall -Wpointer-arith -D_GNU_SOURCE $CPPF
 # Obtain git SHA of HEAD
 AC_SUBST(GIT_SHA, ["-DGIT_SHA=\$(shell if test -d \$(top_srcdir)/.git ; then git -C \$(top_srcdir) rev-parse HEAD ; else printf '\"not available\"'; fi)"])
 
+# Obtain git commit count of HEAD
+AC_SUBST(GIT_COMMIT_CNT, ["-DGIT_COMMIT_CNT=\$(shell if test -d \$(top_srcdir)/.git ; then printf '-'; git -C \$(top_srcdir) rev-list --count HEAD ; fi)"])
+
 AM_COND_IF([WITH_LIBDVBV5], [USE_LIBDVBV5="yes"], [USE_LIBDVBV5="no"])
 AM_COND_IF([WITH_DVBV5_REMOTE], [USE_DVBV5_REMOTE="yes"
 				 AC_DEFINE([HAVE_DVBV5_REMOTE], [1], [Usage of DVBv5 remote enabled])],