如何抑制makefile中的回声?
我在 Makefile 中有以下 PHONY 目标
install:
echo /usr/bin/shelldecrypt must be writable
cp shelldecrypt /usr/bin
当我运行目标时,它会显示正在执行的命令
提示>; make install
输出是
echo /usr/bin/shelldecrypt must be writable /usr/bin/shelldecrypt must be writable cp shelldecrypt /usr/bin
按照我想要的方式输出
/usr/bin/shelldecrypt must be writable cp shelldecrypt /usr/bin
I have the following PHONY target in Makefile
install:
echo /usr/bin/shelldecrypt must be writable
cp shelldecrypt /usr/bin
When I run the target it displays the command it is executing
prompt> make install
OUTPUT IS
echo /usr/bin/shelldecrypt must be writable /usr/bin/shelldecrypt must be writable cp shelldecrypt /usr/bin
OUTPUT AS I WOULD LIKE IT
/usr/bin/shelldecrypt must be writable cp shelldecrypt /usr/bin
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你可以在命令前添加“@”来抑制回声
you could add "@" before your command to surpress that echo