练习makefile,发生空格和tab在makefile中区分很重要。如:
ifde (<arg1>, <arg2>) ifdef和(之间的空格绝对不能少,否则将导致*** missing separator. Stop.错误。测试代码如下
test :
28 @echo $(a)
29 ifneq($(a),$(b))
30 a = equal
31 else
32 a = noequal
33 endif
此代码将导致报错,makefile:29: *** missing separator. Stop.解决方法在ifneq后添加一个空格。
测试环境:gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)