? aclocal.m4
? autom4te.cache
? unreal-4014-version-sync.patch
? ircdcron/ircd.cron
Index: configure
===================================================================
RCS file: /cvs/unreal/Attic/configure,v
retrieving revision 1.1.2.96.2.56
diff -u -B -r1.1.2.96.2.56 configure
===================================================================
RCS file: /cvs/unreal/Attic/configure.ac,v
retrieving revision 1.1.2.16
diff -u -B -r1.1.2.16 configure.ac
--- configure.ac	24 Dec 2010 02:29:53 -0000	1.1.2.16
+++ configure.ac	3 Apr 2011 04:26:46 -0000
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT([unrealircd], [3.2.8.1], [http://bugs.unrealircd.org/], [], [http://unrealircd.org/])
+AC_INIT([unrealircd], [3.2.9_rc1], [http://bugs.unrealircd.org/], [], [http://unrealircd.org/])
 AC_CONFIG_SRCDIR([src/ircd.c])
 AC_CONFIG_HEADER([include/setup.h])
 AC_CONFIG_AUX_DIR([autoconf])
@@ -10,6 +10,25 @@
 	exit 1
 fi
 
+dnl Calculate the versions
+# Generation version number (e.g.: 3 for Unreal3*)
+UNREAL_VERSION_GENERATION=["`expr $PACKAGE_VERSION : '\([^.]*\)\.[^.]*\.[^.-_]*'`"]
+AC_DEFINE_UNQUOTED([UNREAL_VERSION_GENERATION], [$UNREAL_VERSION_GENERATION], [Generation version number (e.g.: 3 for Unreal3*)])
+
+# Major version number (e.g.: 2 for Unreal3.2*)
+UNREAL_VERSION_MAJOR=["`expr $PACKAGE_VERSION : '[0-9]*\.\([0-9]*\)\.[0-9]*'`"]
+AC_DEFINE_UNQUOTED([UNREAL_VERSION_MAJOR], [$UNREAL_VERSION_MAJOR], [Major version number (e.g.: 2 for Unreal3.2*)])
+
+# Minor version number (e.g.: 1 for Unreal3.2.1)
+UNREAL_VERSION_MINOR=["`expr $PACKAGE_VERSION : '[0-9]*\.[0-9]*\.\([0-9]*\)'`"]
+AC_DEFINE_UNQUOTED([UNREAL_VERSION_MINOR], [$UNREAL_VERSION_MINOR], [Minor version number (e.g.: 1 for Unreal3.2.1)])
+
+# The version suffix such as a beta marker or release candidate
+# marker. (e.g.: _rc2 for unrealircd-3.2.9_rc2). This macro is a
+# string instead of an integer because it contains arbitrary data.
+UNREAL_VERSION_SUFFIX=["`expr $PACKAGE_VERSION : '[0-9]*\.[0-9]*\.[0-9]*\(.*\)'`"]
+AC_DEFINE_UNQUOTED([UNREAL_VERSION_SUFFIX], ["$UNREAL_VERSION_SUFFIX"], [Version suffix such as a beta marker or release candidate marker. (e.g.: _rc2 for unrealircd-3.2.9_rc2)])
+
 AC_PROG_CC
 if test "$ac_cv_prog_gcc" = "yes"; then
 CFLAGS="$CFLAGS -funsigned-char"
===================================================================
RCS file: /cvs/unreal/include/Attic/setup.h.in,v
retrieving revision 1.1.2.15.2.11
diff -u -B -r1.1.2.15.2.11 setup.h.in
===================================================================
RCS file: /cvs/unreal/include/version.h,v
retrieving revision 1.1.1.1.6.1.2.36.2.297
diff -u -B -r1.1.1.1.6.1.2.36.2.297 version.h
--- include/version.h	27 Mar 2011 23:00:03 -0000	1.1.1.1.6.1.2.36.2.297
+++ include/version.h	3 Apr 2011 04:26:46 -0000
@@ -7,6 +7,16 @@
 #ifndef __versioninclude
 #define __versioninclude 1
 
+/*
+ * Utility macros to convert version number constants to strings.
+ * Delayed expansion requires two macros to work. See:
+ *
+ * $ info '(cpp) Stringification'
+ */
+#define _macro_to_str(n) #n
+#define macro_to_str(n) _macro_to_str(n)
+
+
 /* 
  * Mark of settings
  */
@@ -29,19 +39,17 @@
  * Also don't forget to bump the protocol version every release.
  */
 
-/** These UNREAL_VERSION_* macros can be used so (3rd party) modules
+/**
+ * The following code concerns UNREAL_VERSION_GENERATION,
+ * UNREAL_VERSION_MAJOR, and UNREAL_VERSION_MINOR.
+ *
+ * These UNREAL_VERSION_* macros can be used so (3rd party) modules
  * can easily distinguish versions.
+ *
+ * They are set during ./configure, so update ./configure.ac's AC_INIT
+ * line upon a new release.
  */
 
-/** The generation version number (eg: 3 for Unreal3*) */
-#define UNREAL_VERSION_GENERATION   3
-
-/** The major version number (eg: 2 for Unreal3.2*) */
-#define UNREAL_VERSION_MAJOR        2
-
-/** The minor version number (eg: 1 for Unreal3.2.1), negative numbers for unstable/alpha/beta */
-#define UNREAL_VERSION_MINOR        9
-
 /** Year + week of the year (ISO week number, with Monday as first day of week)
  * Can be useful if the above 3 versionids are insufficient for you (eg: you want to support CVS).
  * This is updated automatically on the CVS server every Monday. so don't touch it.
@@ -49,10 +57,10 @@
 #define UNREAL_VERSION_TIME         201113
 
 #define UnrealProtocol 		2310
-#define PATCH1  		"3"
-#define PATCH2  		".2"
-#define PATCH3  		".9"
-#define PATCH4  		"-rc1"
+#define PATCH1  		macro_to_str(UNREAL_VERSION_GENERATION)
+#define PATCH2  		"." macro_to_str(UNREAL_VERSION_MAJOR)
+#define PATCH3  		"." macro_to_str(UNREAL_VERSION_MINOR)
+#define PATCH4  		UNREAL_VERSION_SUFFIX
 #define PATCH5  		""
 #define PATCH6  		""
 #define PATCH7  		""
