help-make
[Top][All Lists]
Advanced

[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: Fri, 28 Oct 2005 15:28:45 -0400

%% "Boucher, Jean" <address@hidden> writes:

  bj> Also, one of the situation I'm trying to test for is the empty
  bj> string (in my previous example, say Y=`'), which I believe I can't
  bj> test in this manner:

  bj>     ifeq ($(var),$(filter $(var),X `'))
  bj>         ...
  bj>     endif

Nope, you can't do that.  Hm.  That's tricky, because the empty string
in GNU make means "false".

You can use $(if ...)... a bit strange with an if function inside an
ifeq, but it would work.  You'd have to write it specially: using the
GMSL version John created I don't think will work because the value
you're comparing it to is itself false.

Something like this would work I think (untested):

    ifeq ($(var),$(if $(var),$(filter $(var),X),$(var)))

-- 
-------------------------------------------------------------------------------
 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




reply via email to

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