Complete.Org: Mailing Lists: Archives: freeciv-dev: June 1999:
[Freeciv-Dev] patch: remove config.h from shared.h
Home

[Freeciv-Dev] patch: remove config.h from shared.h

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] patch: remove config.h from shared.h
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Sun, 13 Jun 1999 23:19:33 +1000 (EST)

Now that we no longer support non-configure make methods, we 
don't need to duplicate the version info in shared.h as well 
as in configure.in (and generated into config.h).

This patch takes out the duplicates in shared.h, and also
makes some changes so that we don't need to include config.h 
in shared.h.  This will mean much less will need to be 
re-compiled if you do a re-configure which changes config.h

I suggest that in future if people want to revive the non-configure
make methods (not that I'm encouraging such), such methods should 
provide their own config.h (eg, to be hand-edited), and we should 
include config.h unconditionally (as I've done in this patch, 
instead of with #ifdef HAVE_CONFIG_H, as we do now).

Regards,
-- David
diff -u -r --exclude-from exclude_auto freeciv-cvs/acconfig.h fc-adv/acconfig.h
--- freeciv-cvs/acconfig.h      Sun Jun 13 15:18:38 1999
+++ fc-adv/acconfig.h   Sun Jun 13 22:00:10 1999
@@ -21,6 +21,8 @@
 #undef FREECIV_DATADIR
 #undef MAILING_LIST
 #undef SITE
+#undef FREECIV_NAME_VERSION
+#undef WORD_VERSION
 #undef HAVE_LIBICE
 #undef HAVE_LIBSM
 #undef HAVE_LIBX11
diff -u -r --exclude-from exclude_auto freeciv-cvs/client/civclient.c 
fc-adv/client/civclient.c
--- freeciv-cvs/client/civclient.c      Sat Jun 12 17:40:03 1999
+++ fc-adv/client/civclient.c   Sun Jun 13 22:17:51 1999
@@ -10,6 +10,8 @@
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
 ***********************************************************************/
+#include <config.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff -u -r --exclude-from exclude_auto freeciv-cvs/common/shared.c 
fc-adv/common/shared.c
--- freeciv-cvs/common/shared.c Sat Jun 12 17:40:10 1999
+++ fc-adv/common/shared.c      Sun Jun 13 22:06:17 1999
@@ -10,6 +10,8 @@
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
 ***********************************************************************/
+#include <config.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff -u -r --exclude-from exclude_auto freeciv-cvs/common/shared.h 
fc-adv/common/shared.h
--- freeciv-cvs/common/shared.h Thu Jun 10 22:20:18 1999
+++ fc-adv/common/shared.h      Sun Jun 13 22:06:23 1999
@@ -13,31 +13,6 @@
 #ifndef FC__SHARED_H
 #define FC__SHARED_H
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#else
-
-/* This is for the benefit of Imakefile and Makefile.noimake */
-/* client/server should always have the same major and minor versions */
-/* different patch versions are compatible */
-#define MAJOR_VERSION  1
-#define MINOR_VERSION  8 
-#define PATCH_VERSION  0 
-#define VERSION_STRING "1.8.0"
-#define IS_BETA_VERSION 0 
-#define MAILING_LIST "freeciv-dev@xxxxxxxxxxx"
-#define SITE "http://www.freeciv.org";
-
-#endif /* HAVE_CONFIG_H */
-
-#if IS_BETA_VERSION
-#define FREECIV_NAME_VERSION "Freeciv version "##VERSION_STRING" (beta 
release)"
-#define WORD_VERSION "betatest version"
-#else
-#define FREECIV_NAME_VERSION "Freeciv version "##VERSION_STRING
-#define WORD_VERSION "version"
-#endif
-
 /* Note: the capability string is now in capstr.c --dwp */
 
 #define CITY_NAMES_FONT "10x20"
diff -u -r --exclude-from exclude_auto freeciv-cvs/configure.in 
fc-adv/configure.in
--- freeciv-cvs/configure.in    Sun Jun 13 15:18:40 1999
+++ fc-adv/configure.in Sun Jun 13 22:07:18 1999
@@ -36,6 +36,16 @@
 AC_DEFINE_UNQUOTED(MAILING_LIST, "${MAILING_LIST}")
 AC_DEFINE_UNQUOTED(SITE,"${SITE}")
 
+if test "$IS_BETA_VERSION" = "1"; then
+    FREECIV_NAME_VERSION="Freeciv version ${VERSION} (beta release)"
+    WORD_VERSION="betatest version"
+else
+    FREECIV_NAME_VERSION="Freeciv version ${VERSION}"
+    WORD_VERSION="version"
+fi
+AC_DEFINE_UNQUOTED(FREECIV_NAME_VERSION, "${FREECIV_NAME_VERSION}")
+AC_DEFINE_UNQUOTED(WORD_VERSION, "${WORD_VERSION}")
+
 dnl Initialize automake stuff
 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
 

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