<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40231 >

 - Add generated files to BUILT_SOURCES, and comment cases where not

 $(TOLUA) should be added to dependencies of the api_gen.[ch] so those
would be rebuilt when build tools are updated, especially since there
will be compatibility break(s); sources generated with one Freeciv
revision will not work with another (compilation breaks, so luckily
one is sure to notice such cases)
 OTOH forcing regeneration of these sources on every build (when tolua
is built) can cause problems when tolua itself does not compile
correctly. This affects cross-compilations at least.


 - ML

diff -Nurd -X.diff_ignore freeciv/client/Makefile.am freeciv/client/Makefile.am
--- freeciv/client/Makefile.am	2007-09-19 12:30:22.000000000 +0300
+++ freeciv/client/Makefile.am	2008-05-06 11:37:19.000000000 +0300
@@ -119,6 +119,10 @@
 	audio_none.c    \
 	audio_none.h
 
+# packhand_gen.c & packhand_gen.h are generated files, but as they are
+# generated outside this directory (when building common) there's no point in
+# setting them to BUILT_SOURCES.
+
 civclient_LDFLAGS = $(CLIENT_LDFLAGS) $(GGZMOD_LDFLAGS)
 fc_civclient_libs =	../utility/libcivutility.a	\
 			$(LIBFTWL)			\
diff -Nurd -X.diff_ignore freeciv/server/Makefile.am freeciv/server/Makefile.am
--- freeciv/server/Makefile.am	2008-03-16 23:45:46.000000000 +0200
+++ freeciv/server/Makefile.am	2008-05-06 11:37:27.000000000 +0300
@@ -87,6 +87,10 @@
 		unittools.c	\
 		unittools.h
 
+# hand_gen.c & hand_gen.h are generated files, but as they are generated
+# outside this directory (when building common) there's no point in
+# setting them to BUILT_SOURCES.
+
 civserver_DEPENDENCIES = ../utility/libcivutility.a ../common/libcivcommon.a \
       ../ai/libcivai.a ../utility/libcivutility.a ./libcivserver.a \
       ../utility/libcivutility.a ../common/aicore/libaicore.a \
diff -Nurd -X.diff_ignore freeciv/server/scripting/Makefile.am freeciv/server/scripting/Makefile.am
--- freeciv/server/scripting/Makefile.am	2008-02-02 10:12:39.000000000 +0200
+++ freeciv/server/scripting/Makefile.am	2008-05-06 12:09:19.000000000 +0300
@@ -32,5 +32,7 @@
 EXTRA_DIST = \
 		api.pkg
 
-$(srcdir)/api_gen.c $(srcdir)/api_gen.h: $(srcdir)/api.pkg
+BUILT_SOURCES = api_gen.c api_gen.h
+
+api_gen.c api_gen.h: api.pkg
 	$(TOLUA) -n api -o $(srcdir)/api_gen.c -H $(srcdir)/api_gen.h $(srcdir)/api.pkg
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to