Added wmakePrintBuild for determining the build version

- the $WM_PROJECT_DIR/.build file is automatically updated.
  This file is (and must be) ignored by git.
This commit is contained in:
Mark Olesen
2008-12-19 11:11:20 +01:00
parent 79e9a90c0e
commit 6a4b83bc43
3 changed files with 100 additions and 6 deletions

View File

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