我經常看到使用「@」符號開始命令的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」。 –