Attachment... (I'm getting old... :( )
Index: autogen.sh
===================================================================
--- autogen.sh (revision 70)
+++ autogen.sh (working copy)
@@ -1,11 +1,6 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
-# This is a kludge to make Gentoo behave and select the
-# correct version of automake to use.
-WANT_AUTOMAKE=1.8
-export WANT_AUTOMAKE
-
DIE=0
SRCDIR=`dirname $0`
BUILDDIR=`pwd`
Index: src/Makefile.am
===================================================================
--- src/Makefile.am (revision 70)
+++ src/Makefile.am (working copy)
@@ -8,6 +8,7 @@
-I$(top_srcdir)/lib/sequence -I$(top_srcdir)/lib/sound \
-I$(top_srcdir)/lib/widget -I$(top_srcdir)/lib/ivis_common -I$(top_srcdir)
warzone_SOURCES = \
+ version.c \
scriptvals_parser.y \
scriptvals_lexer.l \
level_lexer.l \
@@ -269,7 +270,6 @@
../lib/script/libscript.a \
../lib/ivis_common/libivis_common.a \
../lib/$(RENDERER)/lib$(RENDERER).a \
- ../lib/ivis_common/libivis_common.a \
../lib/gamelib/libgamelib.a \
../lib/sequence/libsequence.a \
../lib/widget/libwidget.a
@@ -280,12 +280,14 @@
warzone_DEPENDENCIES = $(warzone_libs)
warzone_LDADD = $(warzone_libs)
-# 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)
-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)
-
+##
+## on every build, record the working copy revision string
+##
+.PHONY: version.c
+version.c:
+ echo -n 'const char* version(void) { return "' > version.c
+ echo -n $(VERSION) >> version.c
+ echo '"; }' >> version.c
+ echo -n 'const char* revision(void) { return "' >> version.c
+ echo -n `svnversion -n .` >> version.c
+ echo '"; }' >> version.c
Index: src/revision.h
===================================================================
--- src/revision.h (revision 70)
+++ src/revision.h (working copy)
@@ -1 +0,0 @@
-#define SVN_REVISION "Revision 68M"
Index: src/revision.h.template
===================================================================
--- src/revision.h.template (revision 70)
+++ src/revision.h.template (working copy)
@@ -1 +0,0 @@
-#define SVN_REVISION "$WCREV$"
Index: src/version.c
===================================================================
--- src/version.c (revision 0)
+++ src/version.c (revision 0)
@@ -0,0 +1,2 @@
+const char* version(void) { return "2.0.3"; }
+const char* revision(void) { return "70M"; }
Index: src/version.c.tmpl
===================================================================
--- src/version.c.tmpl (revision 0)
+++ src/version.c.tmpl (revision 0)
@@ -0,0 +1,2 @@
+const char* version(void) { return "__VERSION__"; }
+const char* revision(void) { return "__REVISION__"; }
Index: src/version.h
===================================================================
--- src/version.h (revision 0)
+++ src/version.h (revision 0)
@@ -0,0 +1,2 @@
+extern const char * version( void ); // Returns current version.
+extern const char * revision( void ); // Returns current SVN revision.
Index: src/frontend.c
===================================================================
--- src/frontend.c (revision 70)
+++ src/frontend.c (working copy)
@@ -64,12 +64,8 @@
#include "netplay.h"
+#include "version.h"
-#include "revision.h"
-#ifndef SVN_REVISION
-#error "SVN_REVISION must be defined!"
-#endif
-
extern BOOL bSubtitles;
extern VOID intUpdateOptionText(struct _widget *psWidget, struct _w_context *psContext);
@@ -1625,7 +1621,7 @@
iV_SetFont(WFont);
iV_SetTextColour(-1);
- snprintf(sTmp, sTmpSize, "Version %s w/%s - Built %s", SVN_REVISION,
+ snprintf(sTmp, sTmpSize, "Version %s - Revision %s - w/%s - Built %s", version(), revision(),
pie_Hardware() ? "OpenGL" : "SDL", __DATE__);
pgpqOmuPQaXyM.pgp
Description: PGP signature
_______________________________________________ Warzone-dev mailing list [email protected] https://mail.gna.org/listinfo/warzone-dev
