Unix Shell - ifeq expression

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > January 2007 > ifeq expression





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author ifeq expression
Gary Wessle

2007-01-24, 7:19 pm


hi

ifeq ($(ARCH),SunOS)

does the above expression mean that if the variable ARCH has the
string "SunOS" in it then return true?

thanks
clarkbt36@optonline.net

2007-01-24, 7:19 pm



On Jan 24, 5:55 pm, Gary Wessle <phd...@yahoo.com> wrote:
> hi
>
> ifeq ($(ARCH),SunOS)
>
> does the above expression mean that if the variable ARCH has the
> string "SunOS" in it then return true?
>
> thanks


Assuming this is an excerpt from a GNU make makefile, which it
certainly looks like, you are right. It does compare the value of the
string inside the ARCH macro variable with the string SunOS. It does
not return true, however, but simply executes whatever command follows
the "ifeq ($(ARCH), SunOS) line and comes before the next endif command.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com