help-make
[Top][All Lists]
Advanced

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

Re: multiple prerequisites in pattern rules


From: Noel Yap
Subject: Re: multiple prerequisites in pattern rules
Date: Fri, 30 Jan 2004 13:07:10 -0500

"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)

> ? Not sure what you mean.  Make invokes a process: it might be a
> shell, it might be another command.  When the process ends, it provides
> an exit value which make learns when it reaps the child process.  If
> that exit value is 0, all is well.  If the exit value is !0, make
> assumes the command failed.

This answers my question.  Without having looked at the code, I didn't want to 
make any assumptions about how make treated the return code (eg right shifting 
or bit masking it in any way).

Thanks,
Noel
-- 
NOTICE: If received in error, please destroy and notify sender.  Sender does 
not waive confidentiality or privilege, and use is prohibited.




reply via email to

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