I want check for a condition in makefile using ifeq, & not sure how to go about:
ifeq ( cond1 = yes || cond2 = yes )
set value x = 1;
else
set value x = 2;
endif
Please suggest the proper way to do it?
I want check for a condition in makefile using ifeq, & not sure how to go about:
ifeq ( cond1 = yes || cond2 = yes )
set value x = 1;
else
set value x = 2;
endif
Please suggest the proper way to do it?
In addition to the correct answer given above:if you want to check if x=4 or x=6
ifeq ($(x),$(filter $(x),4 6))
x is either 4 or 6. do whatever you like with it
else
x is neither 4 nor 6
endif
Alternate answer is:
ifneq (,$(filter yes,$(cond1) $(cond2)))
x := 1
else
x := 2
endif