On Sep 16, 2010, at 5:56 AM, Radly wrote: > 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?
Use $(info ...) to print the value of your variables. You'll see that OS is equal to STYPE, not what you intended. Do this instead: OS = $(OSTYPE). Derek _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
