Re: [Freeciv-Dev] (PR#40349) else clauses in Makefile.am conditionals

2010-06-18 Thread Marko Lindqvist

URL: http://bugs.freeciv.org/Ticket/Display.html?id=40349 

 This is now handled in gna bug #16142.


 - ML



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#40349) else clauses in Makefile.am conditionals

2008-07-14 Thread Marko Lindqvist

URL: http://bugs.freeciv.org/Ticket/Display.html?id=40349 

2008/7/13 Daniel Markstedt:

 [EMAIL PROTECTED] - Tue Jul 01 20:47:26 2008]:

 2008/7/1 Marko Lindqvist:
  2008/7/1 Jason Dorje Short:
 
  make dist assumes all conditionals pass to find out what needs
 to be
  distributed.
 
   I believe  make dist collects files from both conditional pass
  and conditional fails possibilities.

  In the case of ftwl-directory, I suspect that old automake is not
 properly handling conditionally built library (even though it's in
 conditional pass branch) and subsequently not adding source files it
 would require.

  Attached patch removes conditionality from library and makes entering
 to the directory in the first place conditional instead. Conditional
 subdirs are already used in other places.
  This works for me (automake 1.10.1) at least. I can compile both
 ftwl-client and other clients, and 'make dist' adds ftwl-files no
 matter which client is enabled from configure.

 I cannot currently test this patch, as configuring S2_0 with --enable-
 ftwl fails both with and without it. The last messages are:

 checking for unistd.h... yes
 configure: error: bad value yes for --enable-ftwl

 Try --enable-ftwl=x11 or --enable-ftwl=sdl

 Please test also 'make dist' when ftwl is *not* selected as client at
configure time. 'make dist' should make full tarball, no matter the
configure time selections.


 - ML



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] (PR#40349) else clauses in Makefile.am conditionals

2008-07-13 Thread Daniel Markstedt

URL: http://bugs.freeciv.org/Ticket/Display.html?id=40349 

 [EMAIL PROTECTED] - Tue Jul 01 20:47:26 2008]:
 
 2008/7/1 Marko Lindqvist:
  2008/7/1 Jason Dorje Short:
 
  make dist assumes all conditionals pass to find out what needs 
to be
  distributed.
 
   I believe  make dist collects files from both conditional pass
  and conditional fails possibilities.
 
  In the case of ftwl-directory, I suspect that old automake is not
 properly handling conditionally built library (even though it's in
 conditional pass branch) and subsequently not adding source files it
 would require.
 
  Attached patch removes conditionality from library and makes entering
 to the directory in the first place conditional instead. Conditional
 subdirs are already used in other places.
  This works for me (automake 1.10.1) at least. I can compile both
 ftwl-client and other clients, and 'make dist' adds ftwl-files no
 matter which client is enabled from configure.
 
 
  - ML
 
 

I cannot currently test this patch, as configuring S2_0 with --enable-
ftwl fails both with and without it. The last messages are:

checking for unistd.h... yes
configure: error: bad value yes for --enable-ftwl

 ~Daniel

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] (PR#40349) else clauses in Makefile.am conditionals

2008-07-01 Thread Jason Dorje Short

URL: http://bugs.freeciv.org/Ticket/Display.html?id=40349 

I haven't looked up documentation on this but my feeling is these are
bad - and, in every case I could find, unnecessary.

make dist assumes all conditionals pass to find out what needs to be
distributed.  Thus, if you ever DID have to use the else clause, I can't
see how that would fail to break make dist.  On the other hand with
the way we use else clauses they just fill empty variables which would
be empty anyway.

Attached patches fix this (2.1 patch applies to trunk/2.2 also).

-jason


Index: utility/ftwl/Makefile.am
===
--- utility/ftwl/Makefile.am	(revision 14921)
+++ utility/ftwl/Makefile.am	(working copy)
@@ -2,8 +2,6 @@
 
 if FTWL
 FTWLLIB=libftwl.a
-else
-FTWLLIB=
 endif
 
 noinst_LIBRARIES = $(FTWLLIB)
Index: data/Makefile.am
===
--- data/Makefile.am	(revision 14921)
+++ data/Makefile.am	(working copy)
@@ -16,8 +16,6 @@
 CLIENT_EXTRA_FILES = freeciv.rc-2.0
 endif
 CLIENT_FILES = $(COMMON_CLIENT_FILES) $(CLIENT_EXTRA_FILES)
-else
-CLIENT_FILES =
 endif
 
 if SERVER
@@ -25,8 +23,6 @@
 	civ1.serv \
 	civ2.serv \
 	default.serv
-else
-SERVER_FILES =
 endif
 
 pkgdata_DATA = $(SERVER_FILES) $(CLIENT_FILES)
@@ -54,20 +50,14 @@
 if CLIENT
 CLIENTDATADIRS = amplio misc flags buildings isotrident trident isophex \
  hex2t stdsounds themes wonders
-else
-CLIENTDATADIRS = 
 endif
 
 if SERVER
 SERVERDATADIRS = default civ1 civ2 scenario nation
-else
-SERVERDATADIRS = 
 endif
 
 if CLIENT
 ICONS = freeciv-client.png
-else
-ICONS = 
 endif
 
 icondir = $(prefix)/share/pixmaps
Index: data/icons/Makefile.am
===
--- data/icons/Makefile.am	(revision 14921)
+++ data/icons/Makefile.am	(working copy)
@@ -11,12 +11,6 @@
 	64x64/freeciv-client.png
 icons_128_c = \
 	128x128/freeciv-client.png
-else
-icons_16_c =
-icons_32_c =
-icons_48_c =
-icons_64_c =
-icons_128_c =
 endif
 
 if SERVER
@@ -30,12 +24,6 @@
 	64x64/freeciv-server.png
 icons_128_s = \
 	128x128/freeciv-server.png
-else
-icons_16_s =
-icons_32_s =
-icons_48_s =
-icons_64_s =
-icons_128_s =
 endif
 
 #icons_svg = \
Index: Makefile.am
===
--- Makefile.am	(revision 14921)
+++ Makefile.am	(working copy)
@@ -4,30 +4,20 @@
 
 if CLIENT
 CSUBDIRS = client
-else
-CSUBDIRS = 
 endif
 
 if SERVER
 SSUBDIRS = ai dependencies server
-else
-SSUBDIRS =
 endif
 
 if SERVER
 if CLIENT
 MSUBDIRS = manual
-else
-MSUBDIRS = 
 endif
-else
-MSUBDIRS = 
 endif
 
 if MAKE_DATA
 DSUBDIRS = data
-else
-DSUBDIRS =
 endif
 
 
Index: client/Makefile.am
===
--- client/Makefile.am	(revision 14921)
+++ client/Makefile.am	(working copy)
@@ -47,8 +47,6 @@
 ## directory is included for 'make dist'.
 if MAKE_CLIENT_INCLUDE
 CLI_INCLUDE = include
-else
-CLI_INCLUDE = 
 endif
 
 SUBDIRS = $(GUI_SUBDIR) $(CLI_INCLUDE) agents

Index: utility/ftwl/Makefile.am
===
--- utility/ftwl/Makefile.am	(revision 14929)
+++ utility/ftwl/Makefile.am	(working copy)
@@ -2,8 +2,6 @@
 
 if FTWL
 FTWLLIB=libftwl.a
-else
-FTWLLIB=
 endif
 
 noinst_LIBRARIES = $(FTWLLIB)
Index: data/Makefile.am
===
--- data/Makefile.am	(revision 14929)
+++ data/Makefile.am	(working copy)
@@ -17,8 +17,6 @@
 CLIENT_EXTRA_FILES = freeciv.rc-2.0
 endif
 CLIENT_FILES = $(COMMON_CLIENT_FILES) $(CLIENT_EXTRA_FILES)
-else
-CLIENT_FILES =
 endif
 
 if SERVER
@@ -26,8 +24,6 @@
 	civ1.serv \
 	civ2.serv \
 	history.serv
-else
-SERVER_FILES =
 endif
 
 pkgdata_DATA = $(SERVER_FILES) $(CLIENT_FILES)
@@ -47,14 +43,10 @@
 
 if CLIENT
 CLIENTDATADIRS = misc flags isotrident trident isophex
-else
-CLIENTDATADIRS = 
 endif
 
 if SERVER
 SERVERDATADIRS = default civ1 civ2 scenario nation history
-else
-SERVERDATADIRS = 
 endif
 
 SUBDIRS = $(CLIENTDATADIRS) $(SERVERDATADIRS)
Index: Makefile.am
===
--- Makefile.am	(revision 14929)
+++ Makefile.am	(working copy)
@@ -2,30 +2,20 @@
 
 if CLIENT
 CSUBDIRS = client
-else
-CSUBDIRS = 
 endif
 
 if SERVER
 SSUBDIRS = ai server
-else
-SSUBDIRS =
 endif
 
 if SERVER
 if CLIENT
 MSUBDIRS = manual
-else
-MSUBDIRS = 
 endif
-else
-MSUBDIRS = 
 endif
 
 if MAKE_DATA
 DSUBDIRS = data
-else
-DSUBDIRS =
 endif
 
 
Index: client/Makefile.am
===
--- client/Makefile.am	(revision 14929)
+++ client/Makefile.am	(working copy)
@@ -134,8 +134,6 @@
 ## directory is included for 'make dist'.
 if MAKE_CLIENT_INCLUDE
 CLI_INCLUDE = include
-else
-CLI_INCLUDE = 
 endif
 
 SUBDIRS = $(GUI_SUBDIR) $(CLI_INCLUDE) agents

Index: Makefile.am

Re: [Freeciv-Dev] (PR#40349) else clauses in Makefile.am conditionals

2008-07-01 Thread Marko Lindqvist

URL: http://bugs.freeciv.org/Ticket/Display.html?id=40349 

2008/7/1 Jason Dorje Short:

 I haven't looked up documentation on this but my feeling is these are
 bad - and, in every case I could find, unnecessary.

 Sometimes automake considers not setting variable at all an error. At
the very least you are unable to use '+=' for unset variable.

 make dist assumes all conditionals pass to find out what needs to be
 distributed.

 I believe  make dist collects files from both conditional pass
and conditional fails possibilities.


 - ML



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#40349) else clauses in Makefile.am conditionals

2008-07-01 Thread Marko Lindqvist

URL: http://bugs.freeciv.org/Ticket/Display.html?id=40349 

2008/7/1 Marko Lindqvist:
 2008/7/1 Jason Dorje Short:

 make dist assumes all conditionals pass to find out what needs to be
 distributed.

  I believe  make dist collects files from both conditional pass
 and conditional fails possibilities.

 In the case of ftwl-directory, I suspect that old automake is not
properly handling conditionally built library (even though it's in
conditional pass branch) and subsequently not adding source files it
would require.

 Attached patch removes conditionality from library and makes entering
to the directory in the first place conditional instead. Conditional
subdirs are already used in other places.
 This works for me (automake 1.10.1) at least. I can compile both
ftwl-client and other clients, and 'make dist' adds ftwl-files no
matter which client is enabled from configure.


 - ML

diff -Nurd -X.diff_ignore freeciv/utility/ftwl/Makefile.am 
freeciv/utility/ftwl/Makefile.am
--- freeciv/utility/ftwl/Makefile.am2007-03-05 19:15:19.0 +0200
+++ freeciv/utility/ftwl/Makefile.am2008-07-01 21:57:16.0 +0300
@@ -1,12 +1,6 @@
 ## Process this file with automake to produce Makefile.in
 
-if FTWL
-FTWLLIB=libftwl.a
-else
-FTWLLIB=
-endif
-
-noinst_LIBRARIES = $(FTWLLIB)
+noinst_LIBRARIES = libftwl.a
 
 AM_CPPFLAGS = -I. -I$(top_srcdir)/utility  -I../../intl 
-I/usr/include/freetype2 @CLIENT_CFLAGS@
 
@@ -17,6 +11,7 @@
 
 ALL_BACKEND_X11_FILES=$(BACKEND_COMMON_FILES) be_x11_ximage.c
 ALL_BACKEND_SDL_FILES=$(BACKEND_COMMON_FILES) be_sdl.c
+
 ALL_OTHER_FILES=   \
back_end.h  \
common_types.c  \
@@ -43,11 +38,8 @@
 if FTWL_SDL
 BACKEND_SDL_FILES=$(ALL_BACKEND_SDL_FILES)
 endif
-if FTWL
-OTHER_FILES=$(ALL_OTHER_FILES)
-endif
 
 ## Above, note -I../../intl instead of -I$(top_srdir)/intl is deliberate.
 
 libftwl_a_SOURCES = $(BACKEND_X11_FILES) \
-   $(BACKEND_SDL_FILES) $(OTHER_FILES)
+   $(BACKEND_SDL_FILES) $(ALL_OTHER_FILES)
diff -Nurd -X.diff_ignore freeciv/utility/Makefile.am 
freeciv/utility/Makefile.am
--- freeciv/utility/Makefile.am 2007-03-05 19:15:20.0 +0200
+++ freeciv/utility/Makefile.am 2008-07-01 21:54:42.0 +0300
@@ -1,6 +1,8 @@
 ## Process this file with automake to produce Makefile.in
 
-SUBDIRS=ftwl
+if FTWL
+SUBDIRS = ftwl
+endif
 
 noinst_LIBRARIES = libcivutility.a
 
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev