removed unix server revision caching -- now it will always display the actual working copy revision (before it required a 'make clean' to drop the cache in unix)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15356 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
shennetsind 2012-01-03 16:15:40 +00:00
parent 19228b6c3d
commit 2aa23b11c8
2 changed files with 3 additions and 29 deletions

View File

@ -3,7 +3,7 @@ COMMON_OBJ = obj_all/core.o obj_all/socket.o obj_all/timer.o obj_all/db.o obj_al
obj_all/nullpo.o obj_all/malloc.o obj_all/showmsg.o obj_all/strlib.o obj_all/utils.o \ obj_all/nullpo.o obj_all/malloc.o obj_all/showmsg.o obj_all/strlib.o obj_all/utils.o \
obj_all/grfio.o obj_all/mapindex.o obj_all/ers.o obj_all/md5calc.o \ obj_all/grfio.o obj_all/mapindex.o obj_all/ers.o obj_all/md5calc.o \
obj_all/minicore.o obj_all/minisocket.o obj_all/minimalloc.o obj_all/random.o obj_all/des.o obj_all/minicore.o obj_all/minisocket.o obj_all/minimalloc.o obj_all/random.o obj_all/des.o
COMMON_H = svnversion.h mmo.h plugin.h version.h \ COMMON_H = mmo.h plugin.h version.h \
core.h socket.h timer.h db.h plugins.h lock.h \ core.h socket.h timer.h db.h plugins.h lock.h \
nullpo.h malloc.h showmsg.h strlib.h utils.h \ nullpo.h malloc.h showmsg.h strlib.h utils.h \
grfio.h mapindex.h ers.h md5calc.h random.h des.h grfio.h mapindex.h ers.h md5calc.h random.h des.h
@ -37,7 +37,7 @@ txt: $(TXT_DEPENDS)
sql: $(SQL_DEPENDS) sql: $(SQL_DEPENDS)
clean: clean:
rm -rf *.o obj_all obj_sql svnversion.h rm -rf *.o obj_all obj_sql
help: help:
@echo "possible targets are 'txt' 'sql' 'all' 'clean' 'help'" @echo "possible targets are 'txt' 'sql' 'all' 'clean' 'help'"
@ -74,18 +74,6 @@ obj_sql/%.o: %.c $(COMMON_H) $(COMMON_SQL_H)
@CC@ @CFLAGS@ @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $< @CC@ @CFLAGS@ @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
HAVESVN = $(shell which svnversion)
ifeq ($(findstring /,$(HAVESVN)), /)
svnversion.h:
@printf "#define SVNVERSION " > svnversion.h
@svnversion .. >> svnversion.h
@printf "\n" >> svnversion.h
else
svnversion.h:
@printf "\n" > svnversion.h
endif
# missing object files # missing object files
MT19937AR_OBJ: MT19937AR_OBJ:
@$(MAKE) -C ../../3rdparty/mt19937ar @$(MAKE) -C ../../3rdparty/mt19937ar

View File

@ -12,9 +12,6 @@
#include "../common/timer.h" #include "../common/timer.h"
#include "../common/plugins.h" #include "../common/plugins.h"
#endif #endif
#ifndef _WIN32
#include "svnversion.h"
#endif
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -38,9 +35,7 @@ char **arg_v = NULL;
char *SERVER_NAME = NULL; char *SERVER_NAME = NULL;
char SERVER_TYPE = ATHENA_SERVER_NONE; char SERVER_TYPE = ATHENA_SERVER_NONE;
#ifndef SVNVERSION static char rA_svn_version[10] = "";
static char rA_svn_version[10] = "";
#endif
#ifndef MINICORE // minimalist Core #ifndef MINICORE // minimalist Core
// Added by Gabuzomeu // Added by Gabuzomeu
@ -129,14 +124,6 @@ void signals_init (void)
} }
#endif #endif
#ifdef SVNVERSION
#define xstringify(x) stringify(x)
#define stringify(x) #x
const char *get_svn_revision(void)
{
return xstringify(SVNVERSION);
}
#else// not SVNVERSION
const char* get_svn_revision(void) const char* get_svn_revision(void)
{ {
FILE *fp; FILE *fp;
@ -201,7 +188,6 @@ const char* get_svn_revision(void)
return rA_svn_version; return rA_svn_version;
} }
#endif
/*====================================== /*======================================
* CORE : Display title * CORE : Display title