[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: conditional statement help
From: |
Hambridge, Philip J \(ODP\) |
Subject: |
RE: conditional statement help |
Date: |
Fri, 29 May 2009 13:37:44 +0100 |
If you have 3.81 you could use the $(or) function...
ifeq ($(or $(USE_MK),$(USE_BH)),true)
do something
endif
Regards,
Philip.
-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Garrett Cooper
Sent: 29 May 2009 12:44
To: pip9ball
Cc: address@hidden
Subject: Re: conditional statement help
On Thu, May 21, 2009 at 5:41 PM, pip9ball <address@hidden> wrote:
>
> Hi,
>
> I'm just wondering if it's possible to have "or, and" clauses in conditional
> statements.
>
> For example:
>
> Can this -->
> ifeq($(USE_MK),true)
> do something
> endif
> ifeq($(USE_BH),true)
> do something
> endif
>
> be replaced with this -->
>
> ifeq($(USE_MK) || $(USE_BH), true)
> do something
> endif
>
> currently I have a fairly long ifeq conditional and I need to execute this
> code if either of two variables are set. It would be nice to re-use code if
> possible.
>
> Thanks,
>
> Phillip
Try: <http://www.gnu.org/software/make/manual/make.html#Conditional-Functions>.
Cheers,
-Garrett
_______________________________________________
Help-make mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-make