在 eclipse 生成的 makefile 中,我看到以下规则:
./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 >> "$@"
配方行开头的“ @ ”的目的是什么?
通读 GNU Make 用户手册,我找不到对 @ 的这种用法的参考。然后我假设它实际上是按原样转移到外壳的。
因此,阅读 BASH 手册,我唯一能与此用途相关的地方extglob
是设置选项时的命令替换。但是,在命令行中尝试这个给了我一个错误。