Complete.Org: Mailing Lists: Archives: freeciv-dev: September 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: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#8164) building out of a builddir: generate_packets.py
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 20 Sep 2004 12:28:28 -0700
Reply-to: rt@xxxxxxxxxxx

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

Marko Lindqvist wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8164 >
> 
> Marko Lindqvist wrote:
> 
>>>>You include packets.h from sourcedir -> "current directory" is 
>>>>sourcedir when packets.h includes "packets_gen.h". Try using <> in this 
>>>>include instead of ""
>>
>>  Seems to work
> 
> 
>   Attached patch uses this approach.
> 
>   Also moves generate_packets.py out from library sources.

> diff -Nurd -X.diff_ignore freeciv/common/packets.h freeciv/common/packets.h
> --- freeciv/common/packets.h  2004-09-18 13:28:53.843750000 +0300
> +++ freeciv/common/packets.h  2004-09-19 00:01:31.578125000 +0300
> @@ -65,7 +65,10 @@
>    AUTH_NEWUSER_RETRY  /* inform the client to try a different [new] password 
> */
>  };
>  
> -#include "packets_gen.h"
> +/* Deliberate use of angle-brackets instead of double quotes.
> +   When header exist in both builddir and srcdir, we want to use
> +   generated one in builddir. */
> +#include <packets_gen.h>

I'm OK with doing this but Raimar didn't like it.  However:

1.  There are a lot more files that include the generated files.  See 
also packhand_gen.h and hand_gen.h.

2.  Couldn't they still be included via "" if we just reordered the 
include directories?  Or would this be "bad"?

jason




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