What is the syntax of conditional expressions in Solaris 10 Makefiles?

I have to use /usr/ccs/bin/make on Solaris 10 (SunOS 5.10).

The typical GNU make syntax for ifeq , which can be used to include or exclude text, does not work with Solaris make .

I can use sh style if when assigning values ​​to macros, but I'm looking for a way to include or exclude a bunch of text in a makefile based on an environment variable (e.g. with GNU ifeq ).

Any ideas? I also appreciate any Solaris 10 make documentation.

+4
source share
2 answers

Solaris make is a moderately complex beastie, but it is not GNU Make.

AFAIK, it does not use conventions.

It has conditional macros := and incremental macros += .

+2
source

Online documentation is also available here:

man pages section 1: User Commands

+2
source

Source: https://habr.com/ru/post/1337543/


All Articles