Conditional Statements with OR Condition

666 views
Skip to first unread message

vijayasarathy m

unread,
Feb 28, 2013, 1:51:48 AM2/28/13
to andro...@googlegroups.com
Hi,

I need to make conditional OR check of multiple conditions in Android.mk .
A condition like below

ifeq ($(VARIABLE), XXX) || ifeq($(VARIABLE), YYY)
....do something
endif

But when I do this, I am getting some errors.
Is there a way to do this or the only way is I have to unroll all the conditions and write it as separate conditions.
Please let me know whether there is any way to do without unrolling the conditions.

Thanks & Regards,
Vijayasarathy.M

mic _

unread,
Feb 28, 2013, 3:05:43 AM2/28/13
to andro...@googlegroups.com
Not sure about your problem with the || operator, but you should be able to achieve the same thing with a filter:

ifneq (,$(filter XXX YYY,$(VARIABLE)))
  ....do something
endif


/Michael

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at http://groups.google.com/group/android-ndk?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

vijayasarathy m

unread,
Feb 28, 2013, 4:22:45 AM2/28/13
to andro...@googlegroups.com
Thanks Michael.
It worked.

Thanks & Regards,
Vijayasarathy.M
Reply all
Reply to author
Forward
0 new messages