Subject: Re: stale dependency files breaking build considered harmful
To: Simon J. Gerraty <firstname.lastname@example.org>
From: David Laight <email@example.com>
Date: 02/12/2006 18:08:52
On Sat, Feb 11, 2006 at 10:17:21PM -0800, Simon J. Gerraty wrote:
> There's a trade off to make, between speeding up the average build
> and avoiding this sort of lossage. Some years ago, our build at work
> ditched any sort of separate dependency management - the .depends are
> generated as a side effect of compiling. True, as you note, this will
> result in a build stoppage when a header is removed or renamed, but
> that is quite a rare event (compared to the 100's of builds done daily).
It is possibly to mark the dependencies from .depend files so that the
sources are all .OPTIONAL, make will (maybe after a slight mod) then
ignore the fact that the file is missing.
Another option (not possible with netbsd's make) is to define a rule
that contains commands to create .h files from a fixed (.PHONY) target.
The rules can then be '@echo ignoring stale dependency for $@' which
alerts the user - especially if it persists - without breaking the make.
David Laight: firstname.lastname@example.org