Re: New conditional assignment facility

2024-01-11 Thread Alejandro Colomar
Hi Paul, On 1/11/24 14:38, Paul Smith wrote: On Thu, 2024-01-11 at 14:28 +0100, Alejandro Colomar wrote:   alx@debian:~/tmp$ cat Makefile   var ?= foo   var ?+= bar   $(info $(var))   alx@debian:~/tmp$ make-9000   foo bar   make: *** No targets.  Stop.

Re: New conditional assignment facility

2024-01-11 Thread Paul Smith
On Thu, 2024-01-11 at 14:28 +0100, Alejandro Colomar wrote: > > >   alx@debian:~/tmp$ cat Makefile > > >   var ?= foo > > >   var ?+= bar > > >   $(info $(var)) > > >   alx@debian:~/tmp$ make-9000 > > >   foo bar > > >   make: *** No targets.  Stop. > > >   alx@debian:~/tmp$ make-9000 var=foo > >

Re: New conditional assignment facility

2024-01-11 Thread Alejandro Colomar
On Thu, Jan 11, 2024 at 02:25:25PM +0100, Alejandro Colomar wrote: > On Thu, Jan 11, 2024 at 02:22:19PM +0100, Alejandro Colomar wrote: > > Hi Paul! > > > > On Thu, Jan 11, 2024 at 01:44:19AM -0500, Paul Smith wrote: > > > I've implemented a new capability for conditional assignments (not > > > pu

Re: New conditional assignment facility

2024-01-11 Thread Alejandro Colomar
On Thu, Jan 11, 2024 at 02:22:19PM +0100, Alejandro Colomar wrote: > Hi Paul! > > On Thu, Jan 11, 2024 at 01:44:19AM -0500, Paul Smith wrote: > > I've implemented a new capability for conditional assignments (not > > pushed yet). > > > > After these changes, a "?" can precede any type of assignme

Re: New conditional assignment facility

2024-01-11 Thread Alejandro Colomar
Hi Paul! On Thu, Jan 11, 2024 at 01:44:19AM -0500, Paul Smith wrote: > I've implemented a new capability for conditional assignments (not > pushed yet). > > After these changes, a "?" can precede any type of assignment > operation, not just "=", and make it conditional (that is, it only > takes e

Re: New conditional assignment facility

2024-01-11 Thread Paul Smith
On Thu, 2024-01-11 at 01:44 -0500, Paul Smith wrote: > I've implemented a new capability for conditional assignments (not > pushed yet). > > After these changes, a "?" can precede any type of assignment > operation, not just "=", and make it conditional (that is, it only > takes effect if the vari

Re: New conditional assignment facility

2024-01-11 Thread N. Thiebaud
> I'm pretty uncomfortable with this inversion of expectation, Indeed. This inversion sounds confusing and that use case is already possible, just not with a 'shortcut' notation. > Or maybe we should say the "?+=" operator isn't supported and give an > error since it has no function that also le