[Freeciv-Dev] Re: (PR#7390) python code generators and BUILT_SOURCES
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=7390 >
On Sat, Feb 07, 2004 at 10:02:24AM -0800, Jason Dorje Short wrote:
>
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=7390 >
>
> Raimar Falke wrote:
> > <URL: http://rt.freeciv.org/Ticket/Display.html?id=7390 >
> >
> > On Fri, Feb 06, 2004 at 06:20:49PM -0800, Jason Dorje Short wrote:
> >
> >><URL: http://rt.freeciv.org/Ticket/Display.html?id=7390 >
> >>
> >>Jason Dorje Short wrote:
> >>
> >>><URL: http://rt.freeciv.org/Ticket/Display.html?id=7390 >
> >>>
> >>>I ran across
> >>>
> >>>http://www.gnu.org/software/automake/manual/html_node/Sources.html#Sources
> >>>
> >>>where it explains dependency calculations and how they affect two-stage
> >>>builds.
> >>>
> >>>It seems to me that a normal build (after a clean cvs checkout) succeeds
> >>>only by chance; because the generator happens to be run first. To
> >>>formalize this perhaps a BUILT_SOURCES directive should be added.
> >>
> >>Hmm.
> >>
> >>Obviously a build of a clean cvs checkout will work, since the built
> >>sources are included in it already.
> >>
> >>What might fail is if you change packets.def and then recompile. If it
> >>so happens that (for instance) packets.o is compiled before
> >>packets_gen.h, then the compilation may not be correct. A second run of
> >>"make" would be required to fix it.
> >
> >
> > The extra dependency:
> >
> > packets_gen.h packets_gen.c: packets.def generate_packets.py
> > ./generate_packets.py
> >
> > should take care of this. Or do I miss something here?
>
> You do, but so do I.
>
> The dependency that isn't already known is
>
> packets.c : packets_gen.h
>
> since these .c : .h dependencies are generated as a side effect of
> compilation (in .deps). So I think if you get a clean checkout, change
> packets.def, and then try to compile you _could_ come up with a wrong
> compilation because packets.o is compiled before packets_gen.h. Most
> likely the linking step will fail. This will be fixed by running "make"
> a second time.
But isn't this a generic problem of the dependcy generation if some
*.h/*.c files are generated?! Looks like an misfeature of automake.
Shoul/can we add
packets.c : packets_gen.h
?
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
Living on earth may be expensive, but it includes an annual free trip
around the sun.
|
|