Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2004:
[Freeciv-Dev] Re: (PR#8164) building out of a builddir: generate_packets
Home

[Freeciv-Dev] Re: (PR#8164) building out of a builddir: generate_packets

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#8164) building out of a builddir: generate_packets.py
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Wed, 17 Mar 2004 13:07:21 -0800
Reply-to: rt@xxxxxxxxxxx

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

On Wed, Mar 17, 2004 at 12:11:12PM -0800, Jason Short wrote:
> Fortunately automake already has a method for including a file from the 

> builddir: by using <> instead of "" for the file name.  This changes the 

This doesn't seems clean. Is this really the canonical way? Can you
cite a source.

Index: common/Makefile.am
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/Makefile.am,v
retrieving revision 1.49
diff -u -r1.49 Makefile.am
--- common/Makefile.am  13 Feb 2004 07:57:58 -0000      1.49
+++ common/Makefile.am  17 Mar 2004 19:00:30 -0000
@@ -99,4 +99,4 @@
 
 BUILT_SOURCES = packets_gen.c packets_gen.h
 packets_gen.h packets_gen.c: packets.def generate_packets.py
-       ./generate_packets.py
+       $(top_srcdir)/common/generate_packets.py $(top_srcdir)

It would be better to just specify the whole path to the packets.def
file:
+       $(top_srcdir)/common/generate_packets.py 
$(top_srcdir)/common/packets.def

Index: common/generate_packets.py
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/generate_packets.py,v
retrieving revision 1.7
diff -u -r1.7 generate_packets.py
--- common/generate_packets.py  15 Jan 2004 11:52:38 -0000      1.7
+++ common/generate_packets.py  17 Mar 2004 19:00:30 -0000
@@ -1323,7 +1323,10 @@
 # various files.
 def main():
     ### parsing input
-    input_name="packets.def"

+    if (len(sys.argv) < 2):

The () aren't needed in python

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Using only the operating-system that came with your computer is just
  like only playing the demo-disc that came with your CD-player."




[Prev in Thread] Current Thread [Next in Thread]