aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Savoye <rob@senecass.com>2020-05-18 11:18:22 -0600
committerRob Savoye <rob@senecass.com>2020-05-18 11:18:22 -0600
commit1a76740eff41f63e64f1e65e930ad286f357362c (patch)
tree3129b87756d75c67e74656cd5368977512572c89
parent2e0e9d195c4fc7bacb9dee96229faa8fb099cdc8 (diff)
Add hook to put branch and evision in the version for development builds.
-rw-r--r--Makefile.am4
-rw-r--r--configure.ac5
2 files changed, 8 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index e1a3764..6c48c20 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -212,3 +212,7 @@ info_TEXINFOS = doc/dejagnu.texi
pip-install:
pip3 install --upgrade -e $(top_srcdir)
+
+install-data-hook:
+ revision=`cd $(srcdir) && git rev-parse --short HEAD` \
+ && sed -i -e "s/^set *frame_version.*/set frame_version $(BRANCH)-$${revision}/" $(pkgdatadir)/runtest.exp
diff --git a/configure.ac b/configure.ac
index 40ee6cc..23b38f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,6 +59,9 @@ then
DEJAGNU="/dev/null"
fi
AC_SUBST(DEJAGNU)
-dnl Makefile.am arranges for DEJAGNU to be exported in the environment.
+
+# See what branch we're in
+BRANCH=$(cd ${srcdir} && git branch | grep '^\*' | cut -d ' ' -f 2)
+AC_SUBST(BRANCH)
AC_OUTPUT([Makefile])