[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]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=8164 >
Jason Short wrote:
>>
>>-#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:
I don't like it myself, but I like using srcdir as builddir even less.
> 1. There are a lot more files that include the generated files. See
> also packhand_gen.h and hand_gen.h.
They need same kind of handling, of course.
> 2. Couldn't they still be included via "" if we just reordered the
> include directories? Or would this be "bad"?
Problem is that "header.h" is searched from current directory before
any include paths are considered.
One solution would be to remove generated files from cvs altogether,
let those who cannot generate them to use distributed snapshots instead.
Then there would be no *_gen.h files in srcdir but only in builddir.
And one idea I just got: Lets store *_gen.h headers in separate
directory. They would never be in current directory and we could control
which one gets included by setting include paths.
And if everything else fails we may build these files into srcdir and
not to builddir. They should be identical between different builddirs
anyway (it doesn't matter how builddir is configured). But this is still
evil way :-)
- Caz
|
|