aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authortjw <tjw@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-08-22 16:13:51 +0000
committertjw <tjw@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-08-22 16:13:51 +0000
commitbc5a8944d03f0b96ffa1fd88c33c2f84c4d9249c (patch)
tree2a2e105deec11e9036f8eba4b751e15823e8ee94 /Makefile
parent677e741ce6c129f59c7797646aeb18215078e00f (diff)
downloadioquake3-aero-bc5a8944d03f0b96ffa1fd88c33c2f84c4d9249c.tar.gz
ioquake3-aero-bc5a8944d03f0b96ffa1fd88c33c2f84c4d9249c.zip
* Add SVN version to the version string displayed in the client console
if it can be detected git-svn-id: svn://svn.icculus.org/quake3/trunk@858 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 15 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 2a986af..b875388 100644
--- a/Makefile
+++ b/Makefile
@@ -134,10 +134,15 @@ LIBSDIR=$(MOUNT_DIR)/libs
VERSION=$(shell grep Q3_VERSION $(CMDIR)/q_shared.h | \
sed -e 's/.*".* \([^ ]*\)"/\1/')
+USE_SVN=
ifeq ($(wildcard .svn),.svn)
- SVN_VERSION=$(VERSION)_SVN$(shell LANG=C svnversion .)
-else
- SVN_VERSION=$(VERSION)
+ SVN_REV=$(shell LANG=C svnversion .)
+ ifneq ($(SVN_REV),)
+ SVN_VERSION=$(VERSION)_SVN$(SVN_REV)
+ USE_SVN=1
+ else
+ SVN_VERSION=$(VERSION)
+ endif
endif
@@ -721,6 +726,10 @@ ifeq ($(GENERATE_DEPENDENCIES),1)
endif
endif
+ifneq ($(USE_SVN),)
+ BASE_CFLAGS += -DSVN_VERSION=\\\"$(SVN_VERSION)\\\"
+endif
+
DO_CC=$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) -o $@ -c $<
DO_SMP_CC=$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) -DSMP -o $@ -c $<
DO_BOT_CC=$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) $(BOTCFLAGS) -DBOTLIB -o $@ -c $< # $(SHLIBCFLAGS) # bk001212
@@ -1031,6 +1040,9 @@ endif
$(B)/client/cl_cgame.o : $(CDIR)/cl_cgame.c; $(DO_CC)
$(B)/client/cl_cin.o : $(CDIR)/cl_cin.c; $(DO_CC)
$(B)/client/cl_console.o : $(CDIR)/cl_console.c; $(DO_CC)
+ifneq ($(USE_SVN),)
+ $(B)/client/cl_console.o : .svn/entries
+endif
$(B)/client/cl_input.o : $(CDIR)/cl_input.c; $(DO_CC)
$(B)/client/cl_keys.o : $(CDIR)/cl_keys.c; $(DO_CC)
$(B)/client/cl_main.o : $(CDIR)/cl_main.c; $(DO_CC)