Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2005:
[Freeciv-Dev] Re: (PR#14351) [Patch] Read version info from version.in
Home

[Freeciv-Dev] Re: (PR#14351) [Patch] Read version info from version.in

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] Re: (PR#14351) [Patch] Read version info from version.in
From: "Marko Lindqvist" <marko.lindqvist@xxxxxxxxxxx>
Date: Sun, 13 Nov 2005 05:38:09 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=14351 >

Marko Lindqvist wrote:
> 
>   This makes me wonder if we should just remove support for building 
> without config.h.

  Patch. Also moves info about next release from version.h to version.in.


  - ML

diff -Nurd -X.diff_ignore freeciv/common/version.h freeciv/common/version.h
--- freeciv/common/version.h    2005-11-13 14:12:07.500000000 +0200
+++ freeciv/common/version.h    2005-11-13 15:03:02.015625000 +0200
@@ -19,43 +19,10 @@
 #endif
 #endif
 
-/* The following is for the benefit (?) of non-configure make methods. */
-/* !! These must be the same as their counterparts in configure.in. !! */
-#ifndef MAJOR_VERSION
-#define MAJOR_VERSION          2
-#endif
-#ifndef MINOR_VERSION
-#define MINOR_VERSION          0
-#endif
-#ifndef PATCH_VERSION
-#define PATCH_VERSION          99
-#endif
-#ifndef VERSION_LABEL
-#define VERSION_LABEL          "-devel"
-#endif
-#ifndef IS_DEVEL_VERSION
-#define IS_DEVEL_VERSION       1
-#endif
-#ifndef IS_BETA_VERSION
-#define IS_BETA_VERSION                0
-#endif
-
-/* This is only used if IS_BETA_VERSION is true. */
-#ifndef NEXT_STABLE_VERSION
-#define NEXT_STABLE_VERSION    "1.13.0"
-#endif
 /* This is only used in version.c, and only if IS_BETA_VERSION is true.
    The month[] array is defined in version.c (index: 1==Jan, 2==Feb, ...). */
 #ifndef NEXT_RELEASE_MONTH
-#define NEXT_RELEASE_MONTH     (month[6])
-#endif
-
-#ifndef VERSION_STRING
-#define VER_STRINGIFY1(x) #x
-#define VER_STRINGIFY(x) VER_STRINGIFY1(x)
-#define VERSION_STRING VER_STRINGIFY(MAJOR_VERSION) "." \
-                       VER_STRINGIFY(MINOR_VERSION) "." \
-                       VER_STRINGIFY(PATCH_VERSION) VERSION_LABEL
+#define NEXT_RELEASE_MONTH     (month[RELEASE_MONTH])
 #endif
 
 /* version informational strings */
diff -Nurd -X.diff_ignore freeciv/configure.ac freeciv/configure.ac
--- freeciv/configure.ac        2005-11-13 14:12:07.625000000 +0200
+++ freeciv/configure.ac        2005-11-13 14:43:12.703125000 +0200
@@ -32,7 +32,9 @@
 AC_DEFINE_UNQUOTED(VERSION_LABEL, "${VERSION_LABEL}", [Version label])
 AC_DEFINE_UNQUOTED(VERSION_STRING, 
"${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}${VERSION_LABEL}", [Version 
string])
 AC_DEFINE_UNQUOTED(IS_DEVEL_VERSION, $IS_DEVEL_VERSION, [Is this a devel 
version])
-AC_DEFINE_UNQUOTED(IS_BETA_VERSION, $IS_BETA_VERSION, [Is this a beta 
veersion])
+AC_DEFINE_UNQUOTED(IS_BETA_VERSION, $IS_BETA_VERSION, [Is this a beta version])
+AC_DEFINE_UNQUOTED(NEXT_STABLE_VERSION, "$NEXT_STABLE_VERSION", [Version 
number of next release])
+AC_DEFINE_UNQUOTED(RELEASE_MONTH, $RELEASE_MONTH, [Month next version will be 
released])
 
 dnl Initialize automake stuff
 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
diff -Nurd -X.diff_ignore freeciv/m4/version.m4 freeciv/m4/version.m4
--- freeciv/m4/version.m4       2005-11-13 14:13:52.859375000 +0200
+++ freeciv/m4/version.m4       2005-11-13 14:44:13.171875000 +0200
@@ -17,3 +17,5 @@
 ])
 AC_DEFUN([FREECIV_DEVEL_VERSION], [IS_DEVEL_VERSION="$1"])
 AC_DEFUN([FREECIV_BETA_VERSION], [IS_BETA_VERSION="$1"])
+AC_DEFUN([FREECIV_NEXT_VERSION], [NEXT_STABLE_VERSION="$1"])
+AC_DEFUN([FREECIV_RELEASE_MONTH], [RELEASE_MONTH="$1"])
diff -Nurd -X.diff_ignore freeciv/version.in freeciv/version.in
--- freeciv/version.in  2005-11-13 14:14:28.500000000 +0200
+++ freeciv/version.in  2005-11-13 15:07:50.093750000 +0200
@@ -6,12 +6,10 @@
 FREECIV_VERSION_COMMENT("  language used. Don't add comments             ")
 FREECIV_VERSION_COMMENT("  specific to some language into this file.     ")
 
-FREECIV_VERSION_COMMENT("  For now version information in                ")
-FREECIV_VERSION_COMMENT("  common/version.h                              ")
-FREECIV_VERSION_COMMENT("  must be updated manually when ever this file  ")
-FREECIV_VERSION_COMMENT("  changes.                                      ")
-
 FREECIV_VERSION_INFO(2,0,99,"-devel")
 
 FREECIV_DEVEL_VERSION(1)
 FREECIV_BETA_VERSION(0)
+
+FREECIV_NEXT_VERSION("2.1.0")
+FREECIV_RELEASE_MONTH(6)

[Prev in Thread] Current Thread [Next in Thread]