diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2014-01-31 16:33:48 -0800 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2014-02-01 01:05:35 -0800 |
commit | 0aa19e9457ce3258a4df74876e542f0b6fbbf2ba (patch) | |
tree | 0f4a30ec84d03dacf53db510488d4ff98fd75b49 /configure.ac | |
parent | 0987f81ee9d3ae5a2ec183bfb9c3ba3dd3bbb4a7 (diff) |
build: Only regenerate src/git-version.h when .git/logs/HEAD changes
We rely on .git/logs/HEAD to be a file that changes when we commit to HEAD.
The first idea is to make the makefile rule depend on .git/HEAD, but that's
a symbolic ref that points to the current ref in refs/heads. However,
.git/logs/HEAD changes whenever we commit to HEAD, so we can use that in the
makefile rule.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index d961ea4d..3caaa594 100644 --- a/configure.ac +++ b/configure.ac @@ -485,6 +485,9 @@ AC_SUBST([dtddir]) AM_CONDITIONAL([HAVE_XMLLINT], [test "x$XMLLINT" != "x" -a "x$dtddir" != "x"]) AC_CONFIG_FILES([Makefile src/version.h src/weston.pc]) + +AM_CONDITIONAL([HAVE_GIT_REPO], [test -f $srcdir/.git/logs/HEAD]) + AC_OUTPUT AC_MSG_RESULT([ |