<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.am    2007-03-05 19:15:19.000000000 +0200
+++ freeciv/utility/ftwl/Makefile.am    2008-07-01 21:57:16.000000000 +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.000000000 +0200
+++ freeciv/utility/Makefile.am 2008-07-01 21:54:42.000000000 +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

Reply via email to