Makefile query

montylee

Skilled
I have a makefile which runs flawlessly in GNU/Linux, AIX, Solaris etc.

The makefile has the following check:

ifeq ($(MY_VAR1),0)

MY_VAR2 = something

else

MY_VAR2 = something else

endif

The makefile gives an error in HPUX. Is there any equivalent to "ifeq" check in HPUX?
 
I did it myself. Here's the code:

MYVAR_0 = something

MYVAR_1 = something else

MYVAR2 = $(MYVAR_$(ENV_VAR))

Now, if the environment variable ENV_VAR is equal to "0", it will execute the first line (MYVAR2=something) otherwise it will execute the second line (MYVAR2=something else).
 
Back
Top