[Freeciv-Dev] Re: (PR#4712) Comments about version.diff
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=4712 >
Jason Short wrote:
> Will this overwrite other configure dependencies (AFAIK there are no
> other configure dependencies, but...).
All other (= none) dependencies set by us, yes, it did. Automatically
generated dependencies (configure.ac/in, acinclude.m4 ..) are in
different, automake's internal, variable.
Attached version avoids overwriting even our (future) dependencies. I
also suspect that two parameter version of AC_SUBST was not in
autocof-2.13, so I changed configure.in to use one parameter version
just in case.
- Caz
diff -Nurd freeciv/Makefile.am freeciv/Makefile.am
--- freeciv/Makefile.am 2004-08-18 17:12:02.312500000 +0300
+++ freeciv/Makefile.am 2004-08-21 10:07:34.453125000 +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-18 17:11:33.421875000 +0300
+++ freeciv/configure.ac 2004-08-21 10:08:43.046875000 +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,9 @@
CFLAGS="$EXTRA_GCC_DEBUG_CFLAGS $CFLAGS"
fi
+dnl Rebuild 'configure' whenever version.in changes, if maintainer mode
enabled.
+AC_SUBST([CONFIGURE_DEPENDENCIES], ["$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-18 17:11:33.437500000 +0300
+++ freeciv/configure.in 2004-08-21 10:09:23.531250000 +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,11 @@
CFLAGS="$EXTRA_GCC_DEBUG_CFLAGS $CFLAGS"
fi
+
+dnl Rebuild 'configure' whenever version.in changes, if maintainer mode
enabled.
+CONFIGURE_DEPENDENCIES="$CONFIGURE_DEPENDENCIES \$(top_srcdir)/version.in"
+AC_SUBST([CONFIGURE_DEPENDENCIES])
+
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-21 10:07:34.515625000 +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_VERSION_INFO],
+[
+ MAJOR_VERSION="$1"
+ MINOR_VERSION="$2"
+ PATCH_VERSION="$3"
+ VERSION_LABEL="$4"
+])
+AC_DEFUN([FREECIV_DEVEL_VERSION], [IS_DEVEL_VERSION="$1"])
+AC_DEFUN([FREECIV_BETA_VERSION], [IS_BETA_VERSION="$1"])
diff -Nurd freeciv/version.in freeciv/version.in
--- freeciv/version.in 1970-01-01 02:00:00.000000000 +0200
+++ freeciv/version.in 2004-08-21 10:07:34.515625000 +0300
@@ -0,0 +1,17 @@
+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(" and common/version.h ")
+FREECIV_VERSION_COMMENT(" must be updated manually when ever this file ")
+FREECIV_VERSION_COMMENT(" changes. ")
+
+FREECIV_VERSION_INFO(1,14,99,"-devel")
+
+FREECIV_DEVEL_VERSION(1)
+FREECIV_BETA_VERSION(0)
|
|