我经常看到使用“@”符号开始命令的Makefiles压制正常输出。双“at”(@@)符号在Makefile中做什么?
target: test
@echo foo
有这样的输出:
$ make test
foo
但我经常遇到生成文件与@@在命令面前:
target: test
@@echo foo
和输出是相同的,据我可以告诉,从Makefiles只有一个@ echo命令之前。
有什么区别?
(但@@似乎是常见的做法,这个谷歌代码搜索所见:http://www.google.com/codesearch#search/&[email protected]@echo%20makefile&type=cs)
出于好奇,比较@echo foo 1>&2和@@ echo foo 1>&2 – Joshua
@joshua我在Makefile中测试了这两个命令,并在一行中输出“foo”。 –