On Sun, 2024-01-28 at 18:06 -0500, rsbec...@nexbridge.com wrote: > > FOO +:= bar > > > > can be interpreted as working like this: > > > > FOO := $(FOO) bar > > > > which is what you and others are arguing for. Or it can be > > interpreted as working > > like this: > > > > __FOO := bar > > FOO += $(__FOO) > > > > (where the value of __FOO is immutable). This is what I was > > thinking. > > I do not think the above two are equivalent.
?? They're definitely NOT equivalent. That's the point. What I was trying to say is that there are two DIFFERENT ways to interpret +:=. You can either interpret "FOO +:= bar" to behave the same as "FOO := $(FOO) bar" which is what you are suggesting. Or you can interpret "FOO +:= bar" to be more-or-less equivalent to writing: __FOO := bar FOO += $(__FOO) If and only if __FOO was not modified after this. Of course there is no way to guarantee that __FOO is not modified after this: there is no such thing as an immutable variable in GNU Make. So in that way this interpretation of "+:=" would be more powerful than anything you can already do in GNU Make today and this would be a truly new capability, not just a shorthand for "FOO := $(FOO) bar" (which you can already easily write if that's what you want). -- Paul D. Smith <psm...@gnu.org> 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