[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Did $(if $(myvar),...) behavior change from make 3.81 to make 4.1?
From: |
David Drinnan |
Subject: |
Did $(if $(myvar),...) behavior change from make 3.81 to make 4.1? |
Date: |
Mon, 12 Jun 2017 18:26:58 -0500 |
I have a makefile that works just fine in make 3.81 on RHEL 6.8, but
quickly fails with make 4.1 on Ubuntu 16.04.
It's failing on this line (details changed, but same logic):
$(if $(myvar),myothervar := abc,myothervar := xyz)
with error message:
build.mk:3: *** empty variable name. Stop.
With some added debug, I can verify that $(myvar) is empty at this point in
the make file.
I searched Google, perused StackOverflow, searched GNU make bugs, and the
GNU make docs -- no luck. I can't even find in the docs where the "$(if
...)" syntax is described.
Has this behavior changed in make 4.1? Or maybe $(if ...) has been
deprecated for a long time, and make 4.1 finally axed it... ? If it did
change, when? And, finally, if you made it this far, what's the recommended
alternative -- ifdef?
Thx in advance for any help!
Best,
--David Drinnan
- Did $(if $(myvar),...) behavior change from make 3.81 to make 4.1?,
David Drinnan <=