help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ifeq and logical OR?


From: Dave Hylands
Subject: Re: ifeq and logical OR?
Date: Sat, 3 Mar 2012 20:49:47 -0800

Hi Jeffrey,

On Sat, Mar 3, 2012 at 7:26 PM, Jeffrey Walton <address@hidden> wrote:
> Hi All,
>
> I currently have the following:
>
> IS_BSD = $(shell $(UNAME) 2>&1 | $(EGREP) -i -c '(openbsd|freebsd|netbsd)')
> IS_DARWIN = $(shell $(UNAME) 2>&1 | $(EGREP) -i -c 'darwin')
> ...
>
> # iconvert library. For GNU Linux, its included in glib
> ifeq ($(IS_BSD),1)
>  LDLIBS += -liconv
> endif
>
> ifeq ($(IS_DARWIN),1)
>  LDLIBS += -liconv
> endif
>
> Is there a way to combine the tests using an OR? I don't recall seing
> it in Stallman's GNU Make book (and the book is not handy at the
> moment).

What about

ifneq( "$(IS_DARWIN)$(IS_BSD)","00" )
LDLIBS += -liconv
endif

-- 
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com



reply via email to

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