Using GNU make, maybe this is what you need?
ifeq ($(var1), value1)
ifeq ($(var2), value2)
...
endif
endif
Cheers,
Ralf
Ralf Wildenhues wrote:
>
> Hello,
>
> * manju...@gmail.com wrote on Mon, Dec 01, 2008 at 08:40:38AM CET:
> Using GNU make, maybe this is what you need?
>
> ifeq ($(var1), value1)
> ifeq ($(var2), value2)
> ...
> endif
> endif
>
> Cheers,
> Ralf
>
>
>
>
--
View this message in context: http://www.nabble.com/Using-logical-oprators-in-GNU-makefile-tp20774036p23290374.html
Sent from the Gnu - Utils - Help mailing list archive at Nabble.com.
please don't top-post, thank you.
* Koteswar16 wrote on Wed, Apr 29, 2009 at 06:37:21AM CEST:
>
> But how to do ORing in make file ?
> i.e.
> ifeq ($(var1), value1) || ($(var2), value2)
You can either repeat the expansion,
ifeq ($(var1), value1)
$(foo)
endif
ifeq ($(var2), value2)
$(foo)
endif
or factor into a new variable, for clarity and to avoid duplicate
expansion,
cond =
ifeq ($(var1), value1)
cond = yes
endif
ifeq ($(var2), value2)
cond = yes
endif
ifdef cond
...
endif
or you can rewrite your makefile to use conditional operators, and then
use $(or ...). See 'info make "Conditional Syntax"' and 'info make
"Conditional Functions"'.
Cheers,
Ralf