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: Sat, 27 Mar 2004 01:00:15 -0800
Reply-to: rt@xxxxxxxxxxx

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

On Fri, Mar 26, 2004 at 11:22:23PM -0800, Jason Short wrote:
> 
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8164 >
> 
> Raimar Falke wrote:
> 
> > Release:
> >   only one packets_gen.c in SRCDIR
> > 
> > Development:
> >   two packets_gen.c in SRCDIR and BUILDDIR
> >   we want the one in BUILDDIR
> > 
> > So if the search order is BUILDDIR,SRCDIR everything should be ok with
> > simple "".
> 
> Hmm, sort of.
> 
> Note that you have the order backwards.  "" searches from back-to-front 
> while <> searches from front-to-back. 

Let me quote from the standard:

  6.10.2 Source file inclusion
...
  A preprocessing directive of the form 
     # include <h-char-sequence> new-line 
  searches a sequence of implementation-defined places for a
  header identified uniquely by the specified sequence between the <
  and > delimiters, and causes the replacement of that directive by
  the entire contents of the header. How the places are specified or
  the header identified is implementation-defined.

  A preprocessing directive of the form 
    # include "q-char-sequence" new-line
  causes the replacement of that directive by the entire contents of
  the source file identified by the specified sequence between the "
  delimiters. The named source file is searched for in an
  implementation-defined manner. If this search is not supported,
  or if the search fails, the directive is reprocessed as if it read 
    # include <h-char-sequence> new-line 
  with the identical contained sequence (including > characters, if
  any) from the original directive.

So you are right that the <>-places are searched after the ""-places
for ""-includes. But the terms "forward" and "backwards" are wrong or
at least very misleading.

I think it is as easy as including both BUILDDIR and SRCDIR in the
""-places and make sure that BUILDDIR occurs before SRCDIR.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "This is Linux Country. On a quiet night, you can hear Windows reboot."




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