use git describe for header version, but use existing wmake framework

This commit is contained in:
Mark Olesen
2008-12-18 19:54:13 +01:00
parent ae9057c9fe
commit b5f06a3833
4 changed files with 24 additions and 3 deletions

View File

@ -1,6 +1,15 @@
.SUFFIXES: .Cver
Cvertoo = sed s/WM_PROJECT_VERSION/\"$(WM_PROJECT_VERSION)\"/ $$SOURCE > $*.C ; $(CC) $(c++FLAGS) -c $*.C -o $@
#
# update version string from git, or just use the WM_PROJECT_VERSION
# note: could also add --abbrev=32 for maximum resolution
#
Cvertoo = \
sed s/WM_PROJECT_VERSION/\"$(shell \
git describe --always --tags 2>/dev/null || \
echo $(WM_PROJECT_VERSION) \
)\"/ $$SOURCE > $*.C; \
$(CC) $(c++FLAGS) -c $*.C -o $@
.Cver.dep:
$(MAKE_DEP)