Add a makefile hook to generate git-version.h
This commit is contained in:
+10
-1
@@ -11,6 +11,7 @@ weston_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
|
|||||||
weston_LDADD = $(COMPOSITOR_LIBS) $(DLOPEN_LIBS) -lm ../shared/libshared.la
|
weston_LDADD = $(COMPOSITOR_LIBS) $(DLOPEN_LIBS) -lm ../shared/libshared.la
|
||||||
|
|
||||||
weston_SOURCES = \
|
weston_SOURCES = \
|
||||||
|
git-version.h \
|
||||||
log.c \
|
log.c \
|
||||||
log.h \
|
log.h \
|
||||||
compositor.c \
|
compositor.c \
|
||||||
@@ -30,6 +31,13 @@ weston_SOURCES = \
|
|||||||
weston-launch.h \
|
weston-launch.h \
|
||||||
weston-egl-ext.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
|
if ENABLE_XWAYLAND
|
||||||
SUBDIRS = xwayland
|
SUBDIRS = xwayland
|
||||||
endif
|
endif
|
||||||
@@ -171,7 +179,8 @@ BUILT_SOURCES = \
|
|||||||
tablet-shell-protocol.c \
|
tablet-shell-protocol.c \
|
||||||
tablet-shell-server-protocol.h \
|
tablet-shell-server-protocol.h \
|
||||||
desktop-shell-protocol.c \
|
desktop-shell-protocol.c \
|
||||||
desktop-shell-server-protocol.h
|
desktop-shell-server-protocol.h \
|
||||||
|
git-version.h
|
||||||
|
|
||||||
CLEANFILES = $(BUILT_SOURCES)
|
CLEANFILES = $(BUILT_SOURCES)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user