tags:

views:

241

answers:

1

Hi, I'm using the following makefile code that works on GNU/Linux:

var0="abc"

ifeq ($(var0),"abc")
var1=alpha
else
var1=beta
endif

all:
    @echo $(var1)

But on Solaris, it produces an error "unexpected line end" or something to that effect. How can I get the desired behavior on Solaris?

A: 

Which make are you using on Solaris?

It would probably be easier to use Gnu make on Solaris rather than to make your makefile work with different makes

Mark
Unfortunately, this is for work and I don't have the choice!
Alex
Solaris does not have any if or equivalent I think http://docs.sun.com/app/docs/doc/816-5165/make-1s?a=viewSo I used to end up doing more in shell commands
Mark
Does your build environment really not support gmake? As of S10, it's installed by default, isn't it?
DDaviesBrackett