Revert previous repository revision number idea, since that could not possibly work. Put the previous work back with some changes to ensure builds are not silently broken when subversion command-line client not present.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@223 4a71c877-e1ca-e34f-864e-861f7616d084
master
Per Inge Mathisen 2005-08-03 20:55:17 +00:00
parent ffec634777
commit 3346f67917
4 changed files with 17 additions and 9 deletions

View File

@ -140,9 +140,12 @@ endif
MAKERULES=../makerules
include $(MAKERULES)/exe.mk
# Just delete frontend.o so it is remade unconditionally to have an
# On every build, record the working copy revision string in revision.h
# if svnversion is not installed, it will be just an empty string.
# Also delete frontend.o so it is remade unconditionally to have an
# up-to-date revision number.
STUPID_TRICK := $(shell rm -rf frontend.o)
SVN_REV := $(shell svnversion ..)
CFLAGS += -DSVN_REVISION=\"$(SVN_REV)\" $(STUPID_TRICK)
REWRITE_REVISION_H1 := $(shell echo -n '\#define SVN_REVISION "Revision ' > revision.h)
REWRITE_REVISION_H2 := $(shell svnversion -n . >> revision.h)
REWRITE_REVISION_H3 := $(shell echo '"' >> revision.h)
CFLAGS += $(STUPID_TRICK) $(REWRITE_REVISION_H1) $(REWRITE_REVISION_H2) $(REWRITE_REVISION_H3)

View File

@ -73,7 +73,6 @@ warzone_SOURCES = \
radar.c \
raycast.c \
research.c \
revision.h \
scores.c \
scriptai.c \
scriptcb.c \
@ -278,7 +277,13 @@ warzone_LDFLAGS = -L../lib/framework -L../lib/gamelib -L../lib/$(RENDERER) \
warzone_DEPENDENCIES = $(warzone_libs)
warzone_LDADD = $(warzone_libs)
# Just delete frontend.o so it is remade unconditionally to have an
# On every build, record the working copy revision string in revision.h
# if svnversion is not installed, it will be just an empty string.
# Also delete frontend.o so it is remade unconditionally to have an
# up-to-date revision number.
STUPID_TRICK := $(shell rm -rf frontend.o)
CFLAGS += $(STUPID_TRICK)
REWRITE_REVISION_H1 := $(shell echo -n '\#define SVN_REVISION "Revision ' > revision.h)
REWRITE_REVISION_H2 := $(shell svnversion -n . >> revision.h)
REWRITE_REVISION_H3 := $(shell echo '"' >> revision.h)
CFLAGS += $(STUPID_TRICK) $(REWRITE_REVISION_H1) $(REWRITE_REVISION_H2) $(REWRITE_REVISION_H3)

View File

@ -1897,7 +1897,7 @@ VOID displayTitleBitmap(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset
iV_SetFont(WFont);
iV_SetTextColour(-1);
sprintf(sTmp, "Version 2.0 beta (%s) w/%s - Built %s", SVN_REVISION,
sprintf(sTmp, "Version 2.0 beta %s w/%s - Built %s", SVN_REVISION,
pie_Hardware() ? "OpenGL" : "SDL", __DATE__);
printf("Version: %s\n", sTmp); fflush(NULL);

View File

@ -1 +1 @@
#define SVN_REVISION "$Revision$"
#define SVN_REVISION ""