makefile中的if

if语句必须顶格

否则报错 word unexpected (expecting ")")

all:
ifeq($(file),)
    @echo "no input file"
else 
    @echo $(file)
endif

ifeg与括号之间必须有空格,执行命令的语句必须缩进

不然报错missing separator. Stop

posted @ 2020-05-03 09:13  friedCoder  阅读(745)  评论(0编辑  收藏  举报