src/Makefile.am: Fix git-version.h for out of tree builds
authorAndre Heider <a.heider@gmail.com>
Fri, 1 Mar 2013 14:38:23 +0000 (15:38 +0100)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 21 Mar 2013 16:42:04 +0000 (12:42 -0400)
Use --git-dir instead of --work-tree, see
http://marc.info/?l=git&m=120390208721287&w=2

Signed-off-by: Andre Heider <a.heider@gmail.com>
src/Makefile.am

index bea3b5f..1839a0e 100644 (file)
@@ -41,7 +41,7 @@ weston_SOURCES =                              \
        weston-egl-ext.h
 
 git-version.h : .FORCE
-       $(AM_V_GEN)(echo "#define BUILD_ID \"$(shell git --work-tree=$(top_srcdir) describe --always --dirty) $(shell git --work-tree=$(top_srcdir) log -1 --format='%s (%ci)')\"" > $@-new; \
+       $(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)')\"" > $@-new; \
        cmp -s $@ $@-new || cp $@-new $@; \
        rm $@-new)