diff options
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | Makefile.common | 2 | ||||
-rw-r--r-- | base/internal_version.h | 6 | ||||
-rw-r--r-- | base/internal_version.h.in | 6 |
4 files changed, 15 insertions, 3 deletions
@@ -30,6 +30,10 @@ CXXFLAGS+= -Wshadow -Wimplicit -Wnon-virtual-dtor -Wwrite-strings # Disable RTTI and exceptions, and enabled checking of pointers returned by "new" CXXFLAGS+= -fno-rtti -fno-exceptions -fcheck-new +ifneq "$(SCUMMVM_SVN_REVISION)" "" +CXXFLAGS+= -DSCUMMVM_SVN_REVISION=\"$(SCUMMVM_SVN_REVISION)\" +endif + # There is a nice extra warning that flags variables that are potentially # used before being initialized. Very handy to catch a certain kind of # bugs. Unfortunately, it only works when optimizations are turned on, diff --git a/Makefile.common b/Makefile.common index 1519f2cf3e..c3267c2122 100644 --- a/Makefile.common +++ b/Makefile.common @@ -118,7 +118,7 @@ VERSION_FILES = \ $(srcdir)/dists/iphone/Info.plist \ $(srcdir)/dists/macosx/Info.plist -VERSION = $(shell cat "${srcdir}/base/internal_version.h" | cut -d\" -f2) +VERSION = $(shell tail -n 1 "${srcdir}/base/internal_version.h" | cut -d\" -f2) VER_MAJOR = $(shell echo $(VERSION) | cut -d. -f 1) VER_MINOR = $(shell echo $(VERSION) | cut -d. -f 2) VER_PATCH = $(shell echo $(VERSION) | cut -d. -f 3 | cut -c1) diff --git a/base/internal_version.h b/base/internal_version.h index 49574529f4..8f327e9edd 100644 --- a/base/internal_version.h +++ b/base/internal_version.h @@ -1 +1,5 @@ -#define SCUMMVM_VERSION "0.14.0svn" +#ifndef SCUMMVM_SVN_REVISION +#define SCUMMVM_SVN_REVISION +#endif + +#define SCUMMVM_VERSION "0.14.0svn" SCUMMVM_SVN_REVISION diff --git a/base/internal_version.h.in b/base/internal_version.h.in index c994f24156..1b7e5ed147 100644 --- a/base/internal_version.h.in +++ b/base/internal_version.h.in @@ -1 +1,5 @@ -#define SCUMMVM_VERSION "@VERSION@" +#ifndef SCUMMVM_SVN_REVISION +#define SCUMMVM_SVN_REVISION +#endif + +#define SCUMMVM_VERSION "@VERSION@" SCUMMVM_SVN_REVISION |