Makefile当中使用alias命令

来源:互联网 发布:窥孔优化 课程设计 编辑:程序博客网 时间:2024/04/29 17:03
Unless you've told it otherwise, make isn't using bash, it's using sh. 
 While sh is probably a symlink to bash, when invoked as "sh" it 
doesn't read your .bashrc (nor the system default). You can change 
this behavior with the SHELL variable in your makefile: 
SHELL := /bin/bash 
In general, though, it's better to set everything that you need in the 
makefile, since relying on your aliases makes your makefile highly 
non-portable. I usually do something like (using your example): 
X := y 
and then using $(X) instead of the alias x in commands. 

http://linux.derkeiler.com/Mailing-Lists/Debian/2005-05/0952.html