Re: [BUG] undefined variable used in recipe before undefine directive

Paul Smith <[email protected]> Fri, 12 Sep 2025 09:39:45 -0400
Newsgroups gmane.comp.gnu.make.bugs
Organization GNU's Not Linux!
Message-ID <[email protected]>
On Thu, 2025-09-11 at 23:00 +0200, Alejandro Colomar wrote:
> Are target-specific variables only available in the recipe?

Yes, they are (your original example didn't say that you wanted to use
the variable in the prerequisites list as well):

https://www.gnu.org/software/make/manual/html_node/Target_002dspecific.html

> As with automatic variables, these values are only available within
> the context of a target’s recipe (and in other target-specific
> assignments).

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