Added the SVN revision number to the 'version' command, but only for

compilers which use "Makefile" (which rules out MSVC)


git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3333 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Lance 2009-07-25 11:22:28 +00:00
parent 10accd2908
commit c88cdc4716
2 changed files with 9 additions and 1 deletions

View File

@ -8,6 +8,8 @@ CPUOPTIMIZATIONS=
BASE_DIR=.
SVNREVISION=-DSVNREVISION=`test -d .svn && svnversion || echo -`
#only limited forms of cross-making is supported
#only the following 3 are supported
#linux->win32 (FTE_TARGET=win32) RPM Package: "mingw32-gcc", DEB Package: "mingw32"
@ -233,7 +235,7 @@ else
BASE_ASM_CFLAGS = -DNOASM
endif
BASE_CFLAGS=$(BASE_ASM_CFLAGS) -Wall -Dstrnicmp=strncasecmp -Dstricmp=strcasecmp -I$(CLIENT_DIR) -I$(SERVER_DIR) -I$(COMMON_DIR) -I$(GL_DIR) -I$(D3D9_DIR) -I$(D3D7_DIR) -I$(PROGS_DIR) -I$(LIBS_DIR) -I$(LIBS_DIR)/dxsdk7/include -I$(LIBS_DIR)/sdl/include -I$(LIBS_DIR)/sdl/include/SDL -I./libs/freetype2/include -I./libs/freetype2/include/freetype -D_vsnprintf=vsnprintf -D_snprintf=snprintf
BASE_CFLAGS=$(BASE_ASM_CFLAGS) -Wall -Dstrnicmp=strncasecmp -Dstricmp=strcasecmp -I$(CLIENT_DIR) -I$(SERVER_DIR) -I$(COMMON_DIR) -I$(GL_DIR) -I$(D3D9_DIR) -I$(D3D7_DIR) -I$(PROGS_DIR) -I$(LIBS_DIR) -I$(LIBS_DIR)/dxsdk7/include -I$(LIBS_DIR)/sdl/include -I$(LIBS_DIR)/sdl/include/SDL -I./libs/freetype2/include -I./libs/freetype2/include/freetype -D_vsnprintf=vsnprintf -D_snprintf=snprintf $(SVNREVISION)
CLIENT_ONLY_CFLAGS=-DCLIENTONLY
SERVER_ONLY_CFLAGS=-DSERVERONLY
JOINT_CFLAGS=

View File

@ -2946,6 +2946,12 @@ void COM_Version_f (void)
Con_TPrintf (TL_EXEDATETIME, __DATE__, __TIME__);
#ifdef SVNREVISION
#define STRINGIFY2(arg) #arg
#define STRINGIFY(arg) STRINGIFY2(arg)
Con_Printf("SVN Revision: %s\n",STRINGIFY(SVNREVISION));
#endif
#ifdef _DEBUG
Con_Printf("debug build\n");
#endif