tech-toolchain archive

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

Re: make: ignore stale .depend



On Tue, Nov 23, 2010 at 05:35:13PM -0800, Simon J. Gerraty wrote:
> The logic in make to ignore stale dependencies learned from .depend 
> seems incomplete.
> 
> When a source file moves, make will ignore the stale dependency,
> but if the file in question is one that needs to be compiled, it
> still hands the bogus name to the compiler.

I added that code to catch the majority of cases (which it does).
I'm not 100% sure your changes aren't going to lead to severe
confusion. The filenames in .depend files usually come from the
-I path list to the compiler, not the :PATH list to make, so
removing the directory path is unlikely to be useful.

FWIW with gmake you can have a pattern rule (IIRC):

%.h:
        echo "Ignoring stale dependency for $@"

Unfortunately nmake doesn't have anything of that nature.
(about the only + point for gmake!)

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index