Complete.Org: Mailing Lists: Archives: freeciv-dev: November 1998:
[Freeciv-Dev] Patch to compile only client or server.
Home

[Freeciv-Dev] Patch to compile only client or server.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Patch to compile only client or server.
From: Sverker Wiberg <sverkerw@xxxxxxxxxxxx>
Date: Wed, 4 Nov 1998 02:08:23 +0100

Here is a patch for FreeCiv 1.7.1 to let the installer choose not to
build the client or the server. The default is as before to build
both, but if configure is given the option `--disable-client' or
`--disable-server', only the server (or the client, respectively) is
built (a minor wart is that if both are given, only libcommon.a is
built).

This patch ought to work well with the client-only X11 config patch
(Sadly I threw away that posting, and it hasn't yet appeared in the
digest.) to get server-only builds in X11-less machines (as someone
recently requested). But I haven't tried it. Yet.

The file .exclude-diffs lists file patterns I don't want included in
my submitted diffs. The file NOTES.Zeke.txt mentioned in
.exclude-diffs just contains site-specific installation notes.

/Sverker

diff -u -P -b -B -r -X freeciv-1.7.1/.exclude-diff 
/home/zeke6/update/sverkerw/src/freeciv-1.7.1/.exclude-diff 
freeciv-1.7.1/.exclude-diff
--- /home/zeke6/update/sverkerw/src/freeciv-1.7.1/.exclude-diff Thu Jan  1 
01:00:00 1970
+++ freeciv-1.7.1/.exclude-diff Wed Nov  4 01:42:40 1998
@@ -0,0 +1,12 @@
+Makefile
+Makefile.in
+NOTES.Zeke.txt
+configure
+aclocal.m4
+config.*
+*~
+*.[ao]
+*.pl
+core
+TAGS
+.xvpics
diff -u -P -b -B -r -X freeciv-1.7.1/.exclude-diff 
/home/zeke6/update/sverkerw/src/freeciv-1.7.1/Makefile.am 
freeciv-1.7.1/Makefile.am
--- /home/zeke6/update/sverkerw/src/freeciv-1.7.1/Makefile.am   Tue Jul 28 
14:37:34 1998
+++ freeciv-1.7.1/Makefile.am   Wed Nov  4 01:11:37 1998
@@ -1,6 +1,18 @@
 ## Process this file with automake to produce Makefile.in
 
-SUBDIRS=       data common ai client server
+if CLIENT
+CSUBDIRS = client data
+else
+CSUBDIRS = 
+endif
+
+if SERVER
+SSUBDIRS = server ai
+else
+SSUBDIRS =
+endif
+
+SUBDIRS=       common $(SSUBDIRS) $(CSUBDIRS)
 
 EXTRA_DIST=    AUTHORS COPYING CREDITS ChangeLog HOWTOPLAY \
                INSTALL Imakefile Makefile.in Makefile.noimake \
diff -u -P -b -B -r -X freeciv-1.7.1/.exclude-diff 
/home/zeke6/update/sverkerw/src/freeciv-1.7.1/configure.in 
freeciv-1.7.1/configure.in
--- /home/zeke6/update/sverkerw/src/freeciv-1.7.1/configure.in  Wed Sep  2 
22:37:02 1998
+++ freeciv-1.7.1/configure.in  Wed Nov  4 01:28:48 1998
@@ -16,6 +16,25 @@
 dnl    AC_DEFINE(DEBUG)
 dnl )
 
+AC_ARG_ENABLE(client,
+[  --disable-client        do not compile the client],
+[case "${enableval}" in
+  yes) client=true ;;
+  no)  client=false ;;
+  *)   AC_MSG_ERROR(bad value ${enableval} for --disable-client) ;;
+esac], [client=true])
+AM_CONDITIONAL(CLIENT, test x$client = xtrue)
+
+AC_ARG_ENABLE(server,
+[  --disable-server        do not compile the server],
+[case "${enableval}" in
+  yes) server=true ;;
+  no)  server=false ;;
+  *)   AC_MSG_ERROR(bad value ${enableval} for --disable-server) ;;
+esac], [server=true])
+AM_CONDITIONAL(SERVER, test x$server = xtrue)
+
+
 dnl Checks for programs.
 AC_PROG_CC
 AC_PROG_CPP

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Patch to compile only client or server., Sverker Wiberg <=