diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2012-06-08 16:02:27 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-06-08 16:16:16 -0400 |
commit | a7496e1c618bdb05adb8372ff5077de71fa0e36a (patch) | |
tree | 0b2867da31e5b94d639dd32f3c90df7d8afddb1b | |
parent | eb587650d25e0d7f0836bc1a9b24f58ed50e870a (diff) |
Add a makefile hook to generate git-version.h
-rw-r--r-- | src/Makefile.am | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index f3dcb75..a94128c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -11,6 +11,7 @@ weston_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) weston_LDADD = $(COMPOSITOR_LIBS) $(DLOPEN_LIBS) -lm ../shared/libshared.la weston_SOURCES = \ + git-version.h \ log.c \ log.h \ compositor.c \ @@ -30,6 +31,13 @@ weston_SOURCES = \ weston-launch.h \ weston-egl-ext.h +git-version.h : .FORCE + echo "#define WESTON_SHA1 \"$(shell git --git-dir=$(top_srcdir)/.git show-ref --head --hash=20 HEAD)\"" > $@-new + cmp -s $@ $@-new || cp $@-new $@ + rm $@-new + +.FORCE : + if ENABLE_XWAYLAND SUBDIRS = xwayland endif @@ -171,7 +179,8 @@ BUILT_SOURCES = \ tablet-shell-protocol.c \ tablet-shell-server-protocol.h \ desktop-shell-protocol.c \ - desktop-shell-server-protocol.h + desktop-shell-server-protocol.h \ + git-version.h CLEANFILES = $(BUILT_SOURCES) |