Noel Yap <[EMAIL PROTECTED]> writes:

> "Paul D. Smith" wrote:
> > No other files other than the target(s) will ever be removed (how could
> > they be, when make doesn't even know they were created?)
> 
> I see.  I had thought, probably naively, that make watched the open calls.
> 
> Given that what you say is true, one way to fix the problem might be to break apart 
> the rule.  For example:
> 
> %.d: %.o
>       $(MakeDependsAction)
> 
> %.o: %.C
>       $(C++CompileAction)

If you kill 'make' during $(MakeDependsAction) and modify, for instance,
a header file included by the %.C file, you will need to run 'make' twice :
1) One to build the %.d.
2) One to use the %.d and notice that the %.o should be updated.

So, it is better to do this :
%.o: %.d
        $(C++CompileAction)
%.d: %.C
        $(MakeDependsAction)
Of course, $(MakeDependsAction) will have to produce 'foo.d: bar.h' instead
of 'foo.o: bar.h'

  -- Benoit




_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make

Reply via email to