help-make
[Top][All Lists]
Advanced

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

Re: do I have to use recursive make to make one target fall on another?


From: Eli Zaretskii
Subject: Re: do I have to use recursive make to make one target fall on another?
Date: Fri, 02 Mar 2012 13:50:32 +0200

> From: "Mark Galeck (CW)" <address@hidden>
> CC: "address@hidden" <address@hidden>
> Date: Fri, 2 Mar 2012 01:46:28 -0800
> 
> Yes, thank you, so what you are saying, translated to my situation, is
> 
> Goal1 goal2: phony
>       <recipe for goal2>

No, that's not what I was saying.  The above doesn't use pattern
rules.  You must use pattern rules for what I said to work for you.

> This is still inefficient, because, if the user wants to make both
> goals: goal1 and goal2, the recipe will be attempted twice.

Because you didn't use pattern rules.  Only for pattern rules, GNU
Make knows to invoke the recipe only once.

>  I only want one attempt.  I want make to know goal1 will be made as a side 
> effect of goal2.

Then make that a pattern rule.



reply via email to

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