tup
tup copied to clipboard
add a conditional assignment operator ?=
Make provides a conditional operator ?=
var ?= value
which sets a value for var provided var is empty. Please provide such an operator in tupfiles too. This would allow less special case treatment when porting makefiles to tupfiles.
Happened to need it too. It's not obvious to me at first, but
ifeq ($(FOO), "")
FOO = yes
endif
can do it.
I thought that was ifndef, but ifndef is for @-variable only.