Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2005:
[Freeciv-Dev] (PR#12992) generate_packets.py srcdir/builddir fix
Home

[Freeciv-Dev] (PR#12992) generate_packets.py srcdir/builddir fix

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#12992) generate_packets.py srcdir/builddir fix
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 5 May 2005 10:16:08 -0700
Reply-to: bugs@xxxxxxxxxxx

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

generate_packets doesn't work with srcdir!=builddir.

This patch lets it work by running the generation directly into the
srcdir, just like is done when srcdir==builddir.  This isn't perfect but
is better than having compilation fail.

-jason

Index: common/Makefile.am
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/Makefile.am,v
retrieving revision 1.56
diff -u -r1.56 Makefile.am
--- common/Makefile.am  25 Apr 2005 19:11:25 -0000      1.56
+++ common/Makefile.am  5 May 2005 17:13:16 -0000
@@ -69,12 +69,17 @@
 BUILT_SOURCES = packets_gen.c packets_gen.h
 
 # ./generate_packets makes both packets_gen.[ch]
+#
 # Feed the dependence through a fake intermediate file to avoid
 # a race condition in a parallel build (like make -j2).
+#
+# Currently we run the generation directly into the source directory.
+# Ideally we'd generate the new files into the build directory but first we'd
+# have to resolve conflicts (since there could then be 2 copies).
 packets_gen.h packets_gen.c: packets_generate
 .INTERMEDIATE: packets_generate
 packets_generate: packets.def generate_packets.py
-       ./generate_packets.py
+       cd $(srcdir) && ./generate_packets.py
        touch packets_generate
 
 #libcivcommon_a_DEPENDENCIES = ../utility/libcivutility.a

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#12992) generate_packets.py srcdir/builddir fix, Jason Short <=