我想使用 ifeq 检查 makefile 中的条件,并且不确定如何进行:
ifeq ( cond1 = yes || cond2 = yes )
set value x = 1;
else
set value x = 2;
endif
请建议正确的方法?
最佳答案
除了上面给出的正确答案:如果你想检查 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
关于makefile - 使用具有多个选项的 ifeq,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26625323/