kno*_*cte 31 makefile build autotools
我有一个像这样的makefile:
install:
@somecommand
#some explanation for next command
@lastcommand
Run Code Online (Sandbox Code Playgroud)
发生的是#some explanation for next command我执行时正在打印注释make install.如何在未打印的makefile中进行注释?也许我正在寻找windowsy的unix等价物echo off?
(实际上,这个问题的反面.)
Jon*_*ler 50
不要缩进注释 - 当行以选项卡开头时,它是由shell执行的命令(并且shell将注释视为注释).
概念证明(ss.mk):
all:
echo "This is the first command"
# This comment is echoed
# This comment is not echoed
echo "This is the second command"
Run Code Online (Sandbox Code Playgroud)
样本输出:
$ make -f ss.mk
echo "This is the first command"
This is the first command
# This comment is echoed
echo "This is the second command"
This is the second command
$
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5963 次 |
| 最近记录: |