生成文件:
a b:
if [ -f s ];then
echo aaa
fi
命令:make b
if [ -f s ];then
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** [b] Error 2
有人可以告诉我为什么吗?
答案 0 :(得分:0)
您不应该混合使用shell脚本并编写脚本。试试下面的
a b:
@if test -f s; then \
echo "aaa";\
fi