答案 0 :(得分:19)
那是Makefile-specific thing;它与shell脚本无关。
以@
开头的食谱不会回显该命令。也就是说,使用Makefile
foo:
echo foo
你得到了
$ make foo # <-- this is meant to be the command you enter in the shell
echo foo
foo
而使用Makefile
foo:
@echo foo
它是
$ make foo
foo
答案 1 :(得分:0)
applemcg.$ fbdy newest trace_any
function newest
{
trace_call $# $*;
[[ -f "$1" ]] || {
trace_call NO $1;
return 1
};
t=$1;
shift;
while [[ -n "$1" ]]; do
[[ "$t" -ot "$1" ]] && {
trace_call NEWER $1 than $t;
return 1
};
shift;
done;
trace_call NEWEST $t;
return 0
}
function trace_any
{
printf $* 1>&2
}
applemcg.$
所以,“制作范式”是
newest outputfile inputa inputb... || {
command input... > outputfile
}
你把你的makefile扔在历史废料堆上。