summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2013-01-03 21:08:28 +0000
committerTim Angus <tim@ngus.net>2013-01-12 21:33:14 +0000
commit23fb1f79d29273af3709be65346add10e83ac488 (patch)
tree7eceed8df98c8a92afa60c355b0c31a96b201396 /Makefile
parentba5614ba0d484d6cc5cc1e327fe9065256e07dee (diff)
Replace svnversion use with git equivalent
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 11 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 258446d3..844fbb8b 100644
--- a/Makefile
+++ b/Makefile
@@ -259,12 +259,12 @@ ifneq ($(BUILD_CLIENT),0)
endif
# Add svn version info
-USE_SVN=
-ifeq ($(wildcard .svn),.svn)
- SVN_REV=$(shell LANG=C svnversion .)
- ifneq ($(SVN_REV),)
- VERSION:=$(VERSION)_SVN$(SVN_REV)
- USE_SVN=1
+USE_GIT=
+ifeq ($(wildcard .git),.git)
+ GIT_REV=$(shell git show -s --pretty=format:%h-%ad --date=short)
+ ifneq ($(GIT_REV),)
+ VERSION:=$(VERSION)_GIT_$(GIT_REV)
+ USE_GIT=1
endif
endif
@@ -2138,11 +2138,11 @@ $(B)/ded/%.o: $(SYSDIR)/%.rc
$(B)/ded/%.o: $(NDIR)/%.c
$(DO_DED_CC)
-# Extra dependencies to ensure the SVN version is incorporated
-ifeq ($(USE_SVN),1)
- $(B)/client/cl_console.o : .svn/entries
- $(B)/client/common.o : .svn/entries
- $(B)/ded/common.o : .svn/entries
+# Extra dependencies to ensure the git version is incorporated
+ifeq ($(USE_GIT),1)
+ $(B)/client/cl_console.o : .git/index
+ $(B)/client/common.o : .git/index
+ $(B)/ded/common.o : .git/index
endif