help-make
[Top][All Lists]
Advanced

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

Re: Advanced Auto-Dependency Generation


From: Greg Kilfoyle
Subject: Re: Advanced Auto-Dependency Generation
Date: Tue, 12 Apr 2005 13:39:19 -0700

I have a step left over from the earlier make environment which does
something similar in that it removes empty dependency files, which got
created some times (not sure why). I could modify this to perform what
you suggest.

At least I now know I'm not doing something wrong in my implementation.
I still have to decide whether I want to do anything further for added
'protection'.

I've already had to chase down a problem where files were not being
rebuilt because I still had a depclean target available to the make
users. With that target removed, maybe I don't have anything else to
worry about :)

Thanks, Greg.


On Tue, 2005-04-12 at 10:33, Greg Chicares wrote:
> On 2005-04-12 12:36 PM, Greg Kilfoyle wrote:
> > 
> > I have implemented dependency generation based on the information from
> > this web page: http://make.paulandlesley.org/autodep.html
> [...]
> > Let's say I have just done a complete build and everything is up-to-
> > date. I then manually remove a dependency file for a particular .c file
> > and update a header file that the .c file is dependent on. If I then run
> > make, the .c file is not rebuilt.
> 
> Dependency files cache information that this technique needs;
> it breaks if you remove them. Make won't recreate them when
> that happens--they're created only as a side effect of the .o
> rule. But you could guard against that by executing
>    for z in *.o; { [ ! -e ${z%.o}.d ] && rm $z }
> to remove any .o file whose .d file is gone.
-- 
Greg Kilfoyle <address@hidden>





reply via email to

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