Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2004:
[Freeciv-Dev] Re: (PR#4712) Version numbering proposal
Home

[Freeciv-Dev] Re: (PR#4712) Version numbering proposal

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Cc: jdwheeler42@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#4712) Version numbering proposal
From: "Marko Lindqvist" <marko.lindqvist@xxxxxxxxxxx>
Date: Sun, 15 Aug 2004 10:08:02 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=4712 >

Marko Lindqvist wrote:
>   I believe that following scenario would be at least reasonably easy to 
> implement and would work quite fine.

  And this could be first step towards it.

  This is just configure part of my earlier patch. It moves version 
information from configure.in and configure.ac into one file, version.in 
so there is one less file to modify when versionnumbers are changed.

  I took liberty of increasing version of "next stable" from "1.13.0" to 
"1.15.0".


  - Caz


diff -Nurd freeciv/Makefile.am freeciv/Makefile.am
--- freeciv/Makefile.am 2004-08-15 02:08:43.609375000 +0300
+++ freeciv/Makefile.am 2004-08-15 19:30:17.234375000 +0300
@@ -69,6 +69,7 @@
                m4/sdl-client.m4                \
                m4/sdl.m4                       \
                m4/sound.m4                     \
+               m4/version.m4                   \
                m4/vsnprintf.m4                 \
                m4/win32-client.m4              \
                m4/x.213                        \
@@ -79,3 +80,5 @@
                vms/imlib_config.h_vms          \
                vms/readme.vms                  \
                vms/vms_build.com
+
+noinst_HEADERS= version.in
diff -Nurd freeciv/configure.ac freeciv/configure.ac
--- freeciv/configure.ac        2004-08-15 02:08:15.562500000 +0300
+++ freeciv/configure.ac        2004-08-15 19:30:17.296875000 +0300
@@ -14,13 +14,7 @@
 
 dnl client/server should always have the same major and minor versions
 dnl different patch versions are compatible
-dnl These values must match in configure.*, common/version.h, and data/Freeciv.
-MAJOR_VERSION=1
-MINOR_VERSION=14
-PATCH_VERSION=99
-VERSION_LABEL="-devel"
-IS_DEVEL_VERSION=1
-IS_BETA_VERSION=0
+m4_include(version.in)
 
 VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}${VERSION_LABEL}
 
@@ -614,6 +608,8 @@
   CFLAGS="$EXTRA_GCC_DEBUG_CFLAGS $CFLAGS"
 fi
 
+AC_SUBST([CONFIGURE_DEPENDENCIES], ['$(top_srcdir)/version.in'])
+
 AC_CONFIG_FILES([Makefile
           data/Makefile 
          data/flags/Makefile
diff -Nurd freeciv/configure.in freeciv/configure.in
--- freeciv/configure.in        2004-08-15 02:08:15.578125000 +0300
+++ freeciv/configure.in        2004-08-15 19:30:17.312500000 +0300
@@ -13,13 +13,7 @@
 
 dnl client/server should always have the same major and minor versions
 dnl different patch versions are compatible
-dnl These values must match in configure.*, common/version.h, and data/Freeciv.
-MAJOR_VERSION=1
-MINOR_VERSION=14
-PATCH_VERSION=99
-VERSION_LABEL="-devel"
-IS_DEVEL_VERSION=1
-IS_BETA_VERSION=0
+m4_include(version.in)
 
 VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}${VERSION_LABEL}
 
@@ -609,6 +603,8 @@
   CFLAGS="$EXTRA_GCC_DEBUG_CFLAGS $CFLAGS"
 fi
 
+AC_SUBST([CONFIGURE_DEPENDENCIES], ['$(top_srcdir)/version.in'])
+
 AC_OUTPUT(Makefile
           data/Makefile 
          data/flags/Makefile
diff -Nurd freeciv/m4/version.m4 freeciv/m4/version.m4
--- freeciv/m4/version.m4       1970-01-01 02:00:00.000000000 +0200
+++ freeciv/m4/version.m4       2004-08-15 19:30:17.328125000 +0300
@@ -0,0 +1,19 @@
+#
+# These macros are used in version.in and they just set
+# version information to form understandable for configure.ac and
+# configure.in. Other systems define these macros differently
+# before reading version.in and thus get version information
+# in different form.
+# 
+
+AC_DEFUN([FREECIV_VERSION_COMMENT])
+
+AC_DEFUN([FREECIV_MAJOR_VERSION], [MAJOR_VERSION="$1"])
+AC_DEFUN([FREECIV_MINOR_VERSION], [MINOR_VERSION="$1"])
+AC_DEFUN([FREECIV_PATCH_VERSION], [PATCH_VERSION="$1"])
+AC_DEFUN([FREECIV_VERSION_LABEL], [VERSION_LABEL="$1"])
+AC_DEFUN([FREECIV_DEVEL_VERSION], [IS_DEVEL_VERSION="$1"])
+AC_DEFUN([FREECIV_BETA_VERSION], [IS_BETA_VERSION="$1"])
+
+AC_DEFUN([FREECIV_NEXT_STABLE])
+AC_DEFUN([FREECIV_RELEASE_MONTH])
diff -Nurd freeciv/server/sernet.c freeciv/server/sernet.c
--- freeciv/server/sernet.c     2004-08-15 02:08:49.140625000 +0300
+++ freeciv/server/sernet.c     2004-08-15 19:30:17.328125000 +0300
@@ -71,6 +71,7 @@
 #include "shared.h"
 #include "support.h"
 #include "timing.h"
+#include "version.h"
 
 #include "connecthand.h"
 #include "console.h"
diff -Nurd freeciv/version.in freeciv/version.in
--- freeciv/version.in  1970-01-01 02:00:00.000000000 +0200
+++ freeciv/version.in  2004-08-15 19:34:47.765625000 +0300
@@ -0,0 +1,21 @@
+FREECIV_VERSION_COMMENT("  Copyright (C) 2004 Freeciv team               ")
+
+FREECIV_VERSION_COMMENT("  Programming language independent version      ")
+FREECIV_VERSION_COMMENT("  definition for freeciv. Macros used here      ")
+FREECIV_VERSION_COMMENT("  are defined differently depending on          ")
+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 data/Freeciv   ")
+FREECIV_VERSION_COMMENT("  must be updated manually when ever this file  ")
+FREECIV_VERSION_COMMENT("  changes.                                      ")
+
+FREECIV_MAJOR_VERSION(1)
+FREECIV_MINOR_VERSION(14)
+FREECIV_PATCH_VERSION(99)
+FREECIV_VERSION_LABEL("-devel")
+FREECIV_DEVEL_VERSION(1)
+FREECIV_BETA_VERSION(0)
+
+FREECIV_NEXT_STABLE("1.15.0")
+FREECIV_RELEASE_MONTH(6)

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