help-make
[Top][All Lists]
Advanced

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

RE: "partially terminal" rule?


From: Paul Smith
Subject: RE: "partially terminal" rule?
Date: Tue, 13 Dec 2011 18:46:55 -0500

On Tue, 2011-12-13 at 14:38 -0800, Mark Galeck (CW) wrote:
> I need all these things, yet, I want the rule for target% to only
> apply if prerequisite0% actually exists.  I do not want to chain with
> the rule for prerequisite0%, I do want to chain with the rule for
> prerequisite1%.  
> 
> If I put target%:, I chain with both.  If I put target%::, I chain
> with none.  I want to chain with exactly one of them.

Nope, nothing like that is possible.

The best you can do is set a target-specific variable on target%, then
in the rule for prerequisite0% you can see if the variable is set and if
so and the target file (prerequisite0%) doesn't exist, you can fail.
However, that doesn't stop the chaining behavior (so any prerequisites
of prerequisite0% will still be checked and rebuilt) etc.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.net
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

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