help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hidden dependencies


From: Krzysztof Cieniuch
Subject: Re: hidden dependencies
Date: Thu, 20 Jan 2011 10:35:22 +0000
User-agent: Thunderbird 2.0.0.24 (X11/20101213)

Philip Guenther wrote:
On Wed, Jan 19, 2011 at 5:26 AM, Warlich, Christof
<address@hidden> wrote:
...
I'm very interested in this subject.  In my project we have generated
code for rpc interfaces and corba plus there is perl tool that generates
some xml files.
Same with me, lots of generated (include) files, so gcc -MD can't track
the dependencies until the files are generted.

What I did on a previous project that faced this was create an
order-only dependency from each file that 'could' #include a generated
.h file to that generated file.  That guarantees the files are created
soon enough without requiring that everything be recompiled if a
generated header file is updated.


Philip Guenther

_______________________________________________
Help-make mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-make
I think my previous reasoning was incorrect. Order dependencies will work in any case if some target depends on order dependency that dependency will be rebuild first if outdated it just won't trigger rebuild of depending targets. So it is perfect fit for generated resources (i.e. everything in project must order depend on generated sources) with just this side effect that they will be always regenerated, and it is "serialization" point in parallel build but that is better then broken build.
So I might to look at this once more. Please correct me if I'm wrong.

The only maintenance issue is keeping up to date list of modules that generate files. My build system includes only necessary makefiles when building project module (subdirectory) Parsing each time 500 makefiles is not an option since it takes to long (on Sun T5440 it takes around 2.5 minute) and if developer is working
on single module edit/recompile cycle would take to long.

NB The problem (or beauty) of build systems is that there is no good solution that would fit all. So what is left is summary of good practices and general guidelines. Is there good book/website
about building build systems with GNU make ?

Thanks
Krzysztof




reply via email to

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