bug-make
[Top][All Lists]
Advanced

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

Re: New conditional assignment facility


From: Jouke Witteveen
Subject: Re: New conditional assignment facility
Date: Mon, 22 Jan 2024 17:28:49 +0100

On Mon, Jan 22, 2024 at 4:59 PM Martin Dorey
<Martin.Dorey@hitachivantara.com> wrote:
>
> Why is that?
>
>
> I imagine because that's how, to my surprise, it is today:
>
> martind@stormy:~/tmp/make-conditional-assignment-2024-01-22$ cat Makefile
> A := 42
> A += $(shell hello)
> martind@stormy:~/tmp/make-conditional-assignment-2024-01-22$ make
> make: hello: No such file or directory
> make: *** No targets.  Stop.
> martind@stormy:~/tmp/make-conditional-assignment-2024-01-22$
>
> ... and changing something so foundational sounds likely to cause widespread 
> issues.
>

As said before, += is going to be the exception (by respecting any
pre-existing variable type) because of legacy. That's not all that bad
though, it just exemplifies that variables can go from recursively
expanded to simply expanded, but not back.



reply via email to

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