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
This commit is contained in:
@@ -113,6 +113,10 @@ endif
|
|||||||
if HAVE_GIT_REPO
|
if HAVE_GIT_REPO
|
||||||
src/git-version.h : $(top_srcdir)/.git/logs/HEAD
|
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)')\"" > $@
|
$(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
|
endif
|
||||||
|
|
||||||
.FORCE :
|
.FORCE :
|
||||||
|
|||||||
Reference in New Issue
Block a user