help-make  

RE: "partially terminal" rule?

Paul Smith
Tue, 13 Dec 2011 15:47:06 -0800

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 <psm...@gnu.org>          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


_______________________________________________
Help-make mailing list
Help-make@gnu.org
https://lists.gnu.org/mailman/listinfo/help-make