[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Logical AND, OR, XOR operators inside ifeq ... endif construct condi
From: |
Paul D. Smith |
Subject: |
Re: Logical AND, OR, XOR operators inside ifeq ... endif construct condition. |
Date: |
Thu, 27 Oct 2005 21:23:40 -0400 |
%% "Boucher, Jean" <address@hidden> writes:
bj> Hello again. Quick question, if I may: Is there a logical OR
bj> operator for the 'ifeq ... endif' statement? That is, I'd like to
bj> execute some statements if variable 'var' is either defined as
bj> string 'X' or 'Y', something like this:
bj> ifeq ((var,X) OR (var,Y))
bj> ...
bj> endif
bj> From reading the manual, I don't see a way to do that, except by
bj> creating two 'ifeq ... endif' constructs sequencially, one to
bj> handle each value for 'var', and repeating the exact same
bj> conditional statements inside each. Yuk!
I do it like this:
ifeq ($(var),$(filter $(var),X Y))
...
endif
Most others can be handled using these types of methods as well.
There are no specific operators for AND, OR, etc.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist