From 1d2dd077e77816975a950c22e8345b9e54e712d0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Mon, 3 Feb 2014 10:55:51 -0800 Subject: [PATCH] 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 --- Makefile.am | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile.am b/Makefile.am index 6eab511..4991c94 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 : -- 2.7.4