summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2014-02-03 10:55:51 -0800
committerKristian Høgsberg <krh@bitplanet.net>2014-02-03 10:55:51 -0800
commit1d2dd077e77816975a950c22e8345b9e54e712d0 (patch)
treefdc3916051554d8103516f509aff8b8c28c0e4d1 /Makefile.am
parent5124b53a135f86d89d473c6b78f2d9f8298ee656 (diff)
build: Add a rule for creating git-version.h when we don't have a git repo
For dist tarballs we ship git-version.h but if you do a git archive or similar to check out a source tree, there's no git-version.h and no way to make one. https://bugs.freedesktop.org/show_bug.cgi?id=74459
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 6eab511b..4991c947 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -113,6 +113,10 @@ endif
if HAVE_GIT_REPO
src/git-version.h : $(top_srcdir)/.git/logs/HEAD
$(AM_V_GEN)echo "#define BUILD_ID \"$(shell git --git-dir=$(top_srcdir)/.git describe --always --dirty) $(shell git --git-dir=$(top_srcdir)/.git log -1 --format='%s (%ci)')\"" > $@
+else
+src/git-version.h :
+ $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
+
endif
.FORCE :