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.
Regards
Anand
________________________________
From: Tony Theodore <[email protected]>
Sent: 04 April 2024 08:18
To: anand akhare <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: variable reassign value in same makefile
> On 3 Apr 2024, at 20:52, anand akhare <[email protected]> wrote:
>
> My idea is that intermediate values of variable should be used until changed
> for target and recipe. Same behavior is seen with non-recursive variables.
> (like VAR:=abc)
You probably want target-specific variables to achieve that behaviour:
https://apac01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.gnu.org%2Fsoftware%2Fmake%2Fmanual%2Fmake.html%23Target_002dspecific&data=05%7C02%7C%7C1bad30b88bd6489f4bfe08dc5451b2e2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638477957090176835%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=qj7Z7EVxe7EtB8CYHPrTf5O9ImmtrULVlWkdj8zxeKg%3D&reserved=0<https://www.gnu.org/software/make/manual/make.html#Target_002dspecific>
Cheers,
Tony