[TUHS] Fwd: I wish to register a complaint! (about BSD make)

Roberto E. Vargas Caballero via TUHS tuhs at tuhs.org
Thu Jan 22 18:20:44 AEST 2026


Hi,

On Thu, Jan 22, 2026 at 06:55:25AM +1000, Warren Toomey via TUHS wrote:
> [1] You'd need "BAZ ?= ." to keep "foo" from being sought in the root
>     directory if the macro wasn't defined on make's command line.  Or
>     via inclusion, depending on the implementation.
> 
>     But "?=" is new to POSIX 2024 so I suppose that for a long time, one
>     couldn't rely on its availability.

"BAZ = ." works for that use case. The only difference is that ?= is more
like make -e, and ?= gives preference to the environment variable. With
= command line has precedence over variables declared in the makefile,
but variables in the makefile have precedence over environment variables.

Regards,


More information about the TUHS mailing list