-makeversion.py
authorrpolzer <rpolzer@61c419a2-8eb2-4b30-bcec-8cead039b335>
Mon, 15 Sep 2008 08:55:43 +0000 (08:55 +0000)
committerrpolzer <rpolzer@61c419a2-8eb2-4b30-bcec-8cead039b335>
Mon, 15 Sep 2008 08:55:43 +0000 (08:55 +0000)
git-svn-id: svn://svn.icculus.org/netradiant/trunk@25 61c419a2-8eb2-4b30-bcec-8cead039b335

ChangeLog
Makefile

index 6a89b4d..794f415 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,8 @@
          instead
        * q2data: remove RSA security copyrighted md4.c, using mdfour.c from DP
          instead as a drop-in replacement
+       * all: get rid of makeversion.py dependency (still need Python for
+         install.py)
 
 2008-09-13 Rudolf Polzer divVerent(at)alientrap.org
        * q3map2: update to ZeroRadiant's q3map2
index 1ad371d..ce50a18 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,8 @@ A = a
 DLL = so
 NETAPI = berkley
 
+RADIANT_ABOUTMSG = Custom build
+
 LDD ?= ldd
 FIND ?= find
 RANLIB ?= ranlib
@@ -48,6 +50,7 @@ LDFLAGS := $(LDFLAGS_COMMON)
 
 .PHONY: all
 all: \
+       makeversion \
        install/q3map2.$(EXE) \
        install/q3data.$(EXE) \
        install/radiant.$(EXE) \
@@ -445,3 +448,19 @@ install/modules/vfspk3.$(DLL): \
        plugins/vfspk3/vfs.o \
        plugins/vfspk3/vfspk3.o \
 
+.PHONY: makeversion
+makeversion:
+       set -ex; \
+       ver=`cat include/version.default`; \
+       major=`echo $$ver | cut -d . -f 2`; \
+       minor=`echo $$ver | cut -d . -f 3 | cut -d - -f 1`; \
+       echo "// generated header, see Makefile" > include/version.h; \
+       echo "#define RADIANT_VERSION \"$$ver\"" >> include/version.h; \
+       echo "#define RADIANT_MAJOR_VERSION \"$$major\"" >> include/version.h; \
+       echo "#define RADIANT_MINOR_VERSION \"$$minor\"" >> include/version.h; \
+       echo "$$major" > include/RADIANT_MAJOR; \
+       echo "$$minor" > include/RADIANT_MINOR; \
+       echo "$$ver" > include/version; \
+       echo "// generated header, see Makefile" > include/aboutmsg.h; \
+       echo "#define RADIANT_ABOUTMSG \"$(RADIANT_ABOUTMSG)\"" >> include/aboutmsg.h; \
+