Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2004:
[Freeciv-Dev] (PR#8387) building out of a builddir: ./civ and ./ser scri
Home

[Freeciv-Dev] (PR#8387) building out of a builddir: ./civ and ./ser scri

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#8387) building out of a builddir: ./civ and ./ser scripts
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 25 Mar 2004 16:40:28 -0800
Reply-to: rt@xxxxxxxxxxx

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

If you have a separate srcdir and builddir you can't use the ./civ and 
./ser scripts.  This isn't a huge problem but it's easy to fix.

civclient and civserver executables are in the builddir; this is where 
the scripts need to be.  Thus they need to be AC_OUTPUT.  However the 
data/ directory from the srcdir needs to be used, so we add it to 
FREECIV_PATH.

After applying the attached patch, removing "civ" and "ser" files and 
replacing them with the attached .in files, it works.

For documentation on AC_CONFIG_FILES see

http://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_chapter/autoconf_4.html#SEC21

jason

? Womoks
? civ.in
? scripts.diff
? ser.in
Index: configure.ac
===================================================================
RCS file: /home/freeciv/CVS/freeciv/configure.ac,v
retrieving revision 1.56
diff -u -r1.56 configure.ac
--- configure.ac        17 Mar 2004 16:26:19 -0000      1.56
+++ configure.ac        26 Mar 2004 00:33:27 -0000
@@ -703,5 +703,6 @@
          doc/nl/Makefile
          doc/sv/Makefile
          undep.sh])
+AC_CONFIG_FILES([civ ser], [chmod +x civ ser])
 AC_CONFIG_COMMANDS([default],[[ chmod +x undep.sh ; ./undep.sh ]],[[]])
 AC_OUTPUT
Index: configure.in
===================================================================
RCS file: /home/freeciv/CVS/freeciv/configure.in,v
retrieving revision 1.232
diff -u -r1.232 configure.in
--- configure.in        22 Mar 2004 19:25:27 -0000      1.232
+++ configure.in        26 Mar 2004 00:33:27 -0000
@@ -688,4 +688,7 @@
          doc/ja/Makefile
          doc/nl/Makefile
          doc/sv/Makefile
-         undep.sh, [ chmod +x undep.sh ; ./undep.sh ])
+         civ
+         ser
+         undep.sh,
+         [ chmod +x undep.sh civ ser ; ./undep.sh ])
#!/bin/sh
#/********************************************************************** 
# Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
# script by Rene Schalburg
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 2, or (at your option)
#   any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#***********************************************************************/
DIR=`dirname $0`
FREECIV_PATH="@top_srcdir@/data:$FREECIV_PATH"

[ -x $DIR/client/civclient ] && EXE=$DIR/client/civclient
[ -x $DIR/civclient ] && EXE=$DIR/civclient

if [ "$EXE" = "" ]; then
  echo $0: Unable to find civclient.
  exit 1
fi

exec $EXE ${1+"$@"}
#!/bin/sh
#/********************************************************************** 
# Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
# script by Rene Schalburg
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 2, or (at your option)
#   any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#***********************************************************************/
DIR=`dirname $0`
FREECIV_PATH="@top_srcdir@/data:$FREECIV_PATH"

[ -x $DIR/server/civserver ] && EXE=$DIR/server/civserver
[ -x $DIR/civserver ] && EXE=$DIR/civserver

if [ "$EXE" = "" ]; then
  echo $0: Unable to find civserver.
  exit 1
fi

exec $EXE ${1+"$@"}

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#8387) building out of a builddir: ./civ and ./ser scripts, Jason Short <=