什么是前导"@"?在makefile的配方 [英] What is the leading "@" at the recipe of a makefile
问题描述
在由eclipse生成的makefile中,我看到以下规则:
In a makefile that is generated by eclipse, I see the following rules:
./Cores/$(TARGET).core.3.srec : ../$(TARGET).core.3/Debug/$(TARGET).core.3.elf
@mkdir -p ./Cores/
@e-objcopy --srec-forceS3 --output-target srec "$<" "$@".temp
@echo Creating srec file for CoreID\<0x826\>
@head --lines=1 "$@".temp | sed 's/0000/0826/' > "$@"
@tail --lines=+2 "$@".temp >> "$@"
在食谱行开头的" @ "的作用是什么?
What is the purpose of the "@" at the beginning of the recipe lines?
通读GNU Make用户手册时,找不到使用@的引用.然后,我假设它实际上是按原样转移到Shell的.
Reading through the GNU Make user's manual I could not find a reference to this use of @. I then assumed that it is actually transferred as-is to the shell.
因此,阅读BASH手册后,与设置相关的唯一用途是设置extglob
选项时的命令替换.但是,在命令行中尝试此操作会给我一个错误.
So, reading the BASH manual, the only place I could relate to this use is in command substitution when the extglob
option is set. However, trying this in the command line gave me an error.
推荐答案
@
前缀使make静默运行命令.参见 GNU制作手册的本部分.
The @
prefix causes make to run the command silently. See this section of the GNU make manual.
这篇关于什么是前导"@"?在makefile的配方的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!