summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-06-09 14:40:30 +0000
committerpeter1138 <peter1138@openttd.org>2006-06-09 14:40:30 +0000
commitda4d1aa292fe01ab2a09e7de4910740bd026b1c2 (patch)
tree629eecf2279cf485fdb4eb1ee4f69730de1b04a3 /Makefile
parent01aec41f693cd891feddf9ed06cabb0a3c7db7a4 (diff)
downloadopenttd-da4d1aa292fe01ab2a09e7de4910740bd026b1c2.tar.xz
(svn r5197) - Use svn info to automatically find the last modified revision number and get branch information and place it in the revision string. Increase NETWORK_REVISION_LENGTH to accommodate the branch tag.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 2e847214f..bff2d5dfc 100644
--- a/Makefile
+++ b/Makefile
@@ -258,7 +258,10 @@ UNITTEST=unit_test$(EXE)
ifdef RELEASE
REV:=$(RELEASE)
else
-REV := $(shell if test -d .svn; then svnversion . | awk '{ print "r"$$0 }'; fi)
+ifeq ($(shell if test -d .svn; then echo 1; fi), 1)
+REV_MODIFIED := $(shell svnversion . | grep -o M)
+REV := $(shell LC_ALL=C svn info | awk '/^URL:.*branch/ { BRANCH="-"a[split($$2, a, "/")] } /^Last Changed Rev:/ { REV="r"$$4"$(REV_MODIFIED)" } END { print REV BRANCH }')
+endif
endif
# define flag to use for -lrt (some OSes overwrites this later for compatibility)