summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-30 05:51:53 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-30 05:51:53 +0000
commitaa6510ad1ed20dd163d946d858a401a9fd2d1941 (patch)
treef577d43fc5dba4fd3a2992d955d14ac540fa41a2
parentda27892d7d7efc066dd21a95b94ae2dd66634631 (diff)
downloadhercules-aa6510ad1ed20dd163d946d858a401a9fd2d1941.tar.gz
hercules-aa6510ad1ed20dd163d946d858a401a9fd2d1941.tar.bz2
hercules-aa6510ad1ed20dd163d946d858a401a9fd2d1941.tar.xz
hercules-aa6510ad1ed20dd163d946d858a401a9fd2d1941.zip
svn prop changes
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@871 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog.txt2
-rw-r--r--Makefile12
-rw-r--r--src/char/Makefile4
-rw-r--r--src/char_sql/Makefile4
-rw-r--r--src/login/Makefile4
-rw-r--r--src/login_sql/Makefile3
-rw-r--r--src/map/Makefile6
7 files changed, 23 insertions, 12 deletions
diff --git a/Changelog.txt b/Changelog.txt
index fe9f243f2..a19c569b6 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -4,6 +4,8 @@ SVN: $Rev$
Date Added
12/29
+ * Modified the build system to include SVN revision as a #define
+ as well as in the executable name (SVN 871) [MouseJstr]
* Fix account register wipe issue (SVN 868) [MouseJstr]
* Double storage/lag exploit fixed (SVN 867) [MouseJstr]
* Another -1 alive_timer fix (SVN 866) [MouseJstr]
diff --git a/Makefile b/Makefile
index 254ac58c1..16058c68b 100644
--- a/Makefile
+++ b/Makefile
@@ -26,13 +26,15 @@ endif
OPT = -g -O2 -ffast-math
+SVN_VERSION = $(shell echo " $Rev$ " | sed -e 's/^.* \(.*\) .*/\1/')
+
ifeq ($(findstring CYGWIN,$(PLATFORM)), CYGWIN)
OS_TYPE = -DCYGWIN
-CFLAGS = $(OPT) -Wall -DFD_SETSIZE=4096 -I../common $(PACKETDEF) $(OS_TYPE)
+CFLAGS = -DSVN_VERSION=$(SVN_VERSION) $(OPT) -Wall -DFD_SETSIZE=4096 -I../common $(PACKETDEF) $(OS_TYPE)
else
OS_TYPE =
-CFLAGS = $(OPT) -Wall -I../common $(PACKETDEF) $(OS_TYPE)
-# CFLAGS = $(OPT) -DTWILIGHT -Wall -I../common $(PACKETDEF) $(OS_TYPE)
+CFLAGS = -DSVN_VERSION=$(SVN_VERSION) $(OPT) -Wall -I../common $(PACKETDEF) $(OS_TYPE)
+# CFLAGS = -DTWILIGHT -DSVN_VERSION=$(SVN_VERSION) $(OPT) -Wall -I../common $(PACKETDEF) $(OS_TYPE)
endif
MYSQLFLAG_INCLUDE_DEFAULT = /usr/local/include/mysql
@@ -67,11 +69,11 @@ else
LIB_S = $(LIB_S_DEFAULT)
endif
-MYLIB = CC="$(CC)" CFLAGS="$(CFLAGS) $(MYSQLFLAG_INCLUDE)" LIB_S="$(LIB_S) $(GCLIB)"
+MYLIB = SVN_VERSION="$(SVN_VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS) $(MYSQLFLAG_INCLUDE)" LIB_S="$(LIB_S) $(GCLIB)"
endif
-MKDEF = CC="$(CC)" CFLAGS="$(CFLAGS)" LIB_S="$(GCLIB)"
+MKDEF = SVN_VERSION="$(SVN_VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" LIB_S="$(GCLIB)"
all: conf txt
diff --git a/src/char/Makefile b/src/char/Makefile
index 877f83c5a..740d2608f 100644
--- a/src/char/Makefile
+++ b/src/char/Makefile
@@ -4,7 +4,9 @@ txt: char-server
COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o ../common/lock.o ../common/malloc.o ../common/showmsg.o ../common/strlib.o
COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/db.h ../common/lock.h ../common/timer.h ../common/malloc.h ../common/showmsg.h ../common/strlib.h
char-server: char.o inter.o int_party.o int_guild.o int_storage.o int_pet.o $(COMMON_OBJ)
- $(CC) -o ../../$@ $>
+ $(CC) -o ../../$@-$(SVN_VERSION) $>
+ cp ../../$@-$(SVN_VERSION) ../../$@
+
char.o: char.c char.h inter.h int_pet.h $(COMMON_H) ../common/version.h
inter.o: inter.c inter.h int_party.h int_guild.h int_storage.h int_pet.h char.h $(COMMON_H)
diff --git a/src/char_sql/Makefile b/src/char_sql/Makefile
index c58e2d59d..10d08e2a9 100644
--- a/src/char_sql/Makefile
+++ b/src/char_sql/Makefile
@@ -5,8 +5,8 @@ COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.
COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/db.h ../common/malloc.h ../common/showmsg.h ../common/utils.h ../common/strlib.h
char-server_sql: char.o inter.o int_party.o int_guild.o int_storage.o int_pet.o itemdb.o $(COMMON_OBJ)
- $(CC) -o ../../$@ $^ $(LIB_S)
-
+ $(CC) -o ../../$@-$(SVN_VERSION) $^ $(LIB_S)
+ cp ../../$@-$(SVN_VERSION) ../../$@
char.o: char.c char.h ../common/strlib.h itemdb.h ../common/showmsg.h
inter.o: inter.c inter.h int_party.h int_guild.h int_storage.h int_pet.h ../common/mmo.h char.h ../common/socket.h ../common/showmsg.h
diff --git a/src/login/Makefile b/src/login/Makefile
index f49aa4b4f..ef3907161 100644
--- a/src/login/Makefile
+++ b/src/login/Makefile
@@ -5,7 +5,9 @@ COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.
COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/version.h ../common/db.h ../common/lock.h ../common/malloc.h ../common/showmsg.h ../common/strlib.h
login-server: login.o md5calc.o $(COMMON_OBJ)
- $(CC) -o ../../$@ login.o md5calc.o $(COMMON_OBJ)
+ $(CC) -o ../../$@-$(SVN_VERSION) login.o md5calc.o $(COMMON_OBJ)
+ cp ../../$@-$(SVN_VERSION) ../../$@
+
login.o: login.c login.h md5calc.h $(COMMON_H)
md5calc.o: md5calc.c md5calc.h
diff --git a/src/login_sql/Makefile b/src/login_sql/Makefile
index 18b023fe6..933acc0ee 100644
--- a/src/login_sql/Makefile
+++ b/src/login_sql/Makefile
@@ -6,7 +6,8 @@ COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.
COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/version.h ../common/db.h ../common/malloc.h ../common/showmsg.h ../common/strlib.h
login-server_sql: login.o md5calc.o $(COMMON_OBJ)
- $(CC) -o ../../$@ $^ $(LIB_S)
+ $(CC) -o ../../$@-$(SVN_VERSION) $^ $(LIB_S)
+ cp ../../$@-$(SVN_VERSION) ../../$@
login.o: login.c login.h md5calc.h $(COMMON_H)
md5calc.o: md5calc.c md5calc.h
diff --git a/src/map/Makefile b/src/map/Makefile
index 0dddf6132..6ac47838c 100644
--- a/src/map/Makefile
+++ b/src/map/Makefile
@@ -14,10 +14,12 @@ COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/grf
LIBS = -lz -lm
map-server: txtobj/map.o txtobj/chrif.o txtobj/clif.o txtobj/pc.o txtobj/npc.o txtobj/chat.o txtobj/path.o txtobj/itemdb.o txtobj/mob.o txtobj/script.o txtobj/storage.o txtobj/skill.o txtobj/atcommand.o txtobj/charcommand.o txtobj/battle.o txtobj/intif.o txtobj/trade.o txtobj/party.o txtobj/vending.o txtobj/guild.o txtobj/pet.o txtobj/log.o $(COMMON_OBJ)
- $(CC) -o ../../$@ $> $(LIBS)
+ $(CC) -o ../../$@-$(SVN_VERSION) $> $(LIBS)
+ cp ../../$@-$(SVN_VERSION) ../../$@
map-server_sql: sqlobj/map.o sqlobj/chrif.o sqlobj/clif.o sqlobj/pc.o sqlobj/npc.o sqlobj/chat.o sqlobj/path.o sqlobj/itemdb.o sqlobj/mob.o sqlobj/script.o sqlobj/storage.o sqlobj/skill.o sqlobj/atcommand.o sqlobj/charcommand.o sqlobj/battle.o sqlobj/intif.o sqlobj/trade.o sqlobj/party.o sqlobj/vending.o sqlobj/guild.o sqlobj/pet.o sqlobj/mail.o sqlobj/log.o $(COMMON_OBJ)
- $(CC) -o ../../$@ $> $(LIB_S)
+ $(CC) -o ../../$@-$(SVN_VERSION) $> $(LIB_S)
+ cp ../../$@-$(SVN_VERSION) ../../$@
txtobj/%.o: %.c
$(COMPILE.c) -DTXT_ONLY $(OUTPUT_OPTION) $<