help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Conditionals, step one


From: Radly
Subject: Conditionals, step one
Date: Thu, 16 Sep 2010 05:56:49 -0700 (PDT)

Problems like this make me feel like a beginner...

I have a project that needs to detect OSTYPE and set LIBS and LIBDIRS
accordingly, but I can't get basic conditionals working.  This doesn't work
on either Mac OSX or Ubuntu Linux; they both use Make 3.81.  Here's a
stripped-down demo of my problem:

OS = $OSTYPE

ifeq ($(value OS), darwin10.0)
  TXT = GOT_IT
else
  TXT = MISSED_IT
endif

all:
        @echo OS = $(value OS)
        @echo $(TXT)

And here's the printed output:
OS = darwin10.0
MISSED_IT

I've tried multiple variations on the ifeq test, and they all fail,
producing the "MISSED_IT" text.

Surely I'm missing something that will be obvious to someone else.  What
might it be?


-- 
View this message in context: 
http://old.nabble.com/Conditionals%2C-step-one-tp29728166p29728166.html
Sent from the Gnu - Make - Help mailing list archive at Nabble.com.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]