我想使用ifeq检查makefile中的条件,并且不确定如何去做:
ifeq ( cond1 = yes || cond2 = yes )
set value x = 1;
else
set value x = 2;
endif
Run Code Online (Sandbox Code Playgroud)
请提出正确的做法吗?
除了上面给出的正确答案之外:如果要检查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
Run Code Online (Sandbox Code Playgroud)