Linux version can display SVN revision number in help screen, ONLY IF svn is installed. Otherwise, the normal version number shows.

This commit is contained in:
mudlord 2008-01-30 10:47:10 +00:00
parent b8379a99bc
commit c545911374
1 changed files with 18 additions and 0 deletions

View File

@ -11,6 +11,7 @@ STRIP=strip -s
DEL=rm -f
OE=.o
OUT=vbam
BASEVERSION=1.8.0
ifeq ($(MACHINE),Darwin)
LFLAGS=-lz -lpng -framework OpenGL `sdl-config --libs`
@ -38,6 +39,23 @@ ifndef $(PREFIX)
PREFIX=/usr/local
endif
ifndef VERSION
SVNVERSION=$(shell test -d .svn && svnversion -n .)
BADCHARS=$(findstring :,$(SVNVERSION))$(findstring S,$(SVNVERSION))
ifeq ($(BADCHARS),)
ifneq ($(SVNVERSION),)
ifneq ($(SVNVERSION),exported)
VERSION=$(BASEVERSION)-r$(subst M,,$(SVNVERSION))
endif
endif
endif
endif
ifdef VERSION
CXXFLAGS+=-DVERSION=\"$(VERSION)\"
endif
MAINDIR=src
SDLDIR=src/sdl
DMGDIR=src/gb