I have a (from my point of view) rather complicated Makefile.
That is mostly because I wanted colors there and other unnecessary things.
Anyway, might I jump right into my question:
Apart from Linux I newly support *BSD, thus I need to check for the platform in use on several places. Is conditional variable assignment possible in a Makefile? Something like:
platform := [ $$(uname) = Linux ] && echo Linux || echo BSD or other
Of course this does not work, but hopefully, you get my point.
I need a solution, that works both with the BSD make
, and the GNU make
.
!=
was added to GNU make in version 4.0. It won't work in older versions. – Heathenism