%% "Boucher, Jean" <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>          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


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to