help-make
[Top][All Lists]
Advanced

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

Re: variable reassign value in same makefile


From: Tony Theodore
Subject: Re: variable reassign value in same makefile
Date: Fri, 5 Apr 2024 18:09:56 +1100


> On 4 Apr 2024, at 18:10, anand akhare <anandstraight@outlook.com> wrote:
> 
> Hello Tony
>     I am looking for confirmation if this is expected behavior. Target 
> specific variables will not have visibility outside of its recipe. I am using 
> VAR variable across makefile.

I’m out of my depth. Five years ago I could hold make’s two-phase processing in 
my head, but now reasoning about global variables is beyond me.

Let alone mutating meta-global variables across makefiles - I generally try to 
reduce the scope of variables and pass them explicitly with function calls or a 
`$(MAKE) foo VAR=bar` in a subshell call.

Cheers,

Tony


reply via email to

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