Kaynağa Gözat

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
shennetsind 13 yıl önce
ebeveyn
işleme
2aa23b11c8
2 değiştirilmiş dosya ile 3 ekleme ve 29 silme
  1. 2 14
      src/common/Makefile.in
  2. 1 15
      src/common/core.c

+ 2 - 14
src/common/Makefile.in

@@ -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/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
-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 \
 	nullpo.h malloc.h showmsg.h  strlib.h utils.h \
 	grfio.h mapindex.h ers.h md5calc.h random.h des.h
@@ -37,7 +37,7 @@ txt: $(TXT_DEPENDS)
 sql: $(SQL_DEPENDS)
 
 clean:
-	rm -rf *.o obj_all obj_sql svnversion.h
+	rm -rf *.o obj_all obj_sql
 
 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) $<
 
 
-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
 MT19937AR_OBJ:
 	@$(MAKE) -C ../../3rdparty/mt19937ar

+ 1 - 15
src/common/core.c

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