我想使用ifeq检查makefile中的条件,&不知道怎么办:
ifeq ( cond1 = yes || cond2 = yes )
set value x = 1;
else
set value x = 2;
endif
请建议正确的方法吗?
答案 0 :(得分:4)
除了上面给出的正确答案:如果你想检查x = 4还是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
答案 1 :(得分:2)
ifeq ($(filter $(cond1) $(cond2),yes),)
x := 2
else
x := 1
endif