Makefile调用Shell语句引起的一个错误

为了解决递归复制目录的时候,不复制.svn目录,将原来的cp命令修改成rsync命令,却引发Makefile始终编译不过。 shell

测试的Makefile svn

Top:
        echo "Makefile include shell script"

$(shell rsync -av --exclude=".*" abc def)
错误:
Makefile:4: *** missing separator.  Stop.

缘由
$(shell rsync -av --exclude=".*" abc def)的结果是一堆result字符

因此makefile文件就解析为下: 
Top:
        echo "Makefile include shell script"

$(result)
能够用这种方法来解决 $(warning $(shell rsync -av --exclude=".*" abc def))
相关文章
相关标签/搜索