禁止清除消息(Makefile静默删除) [英] Suppress messages in make clean (Makefile silent remove)

查看:104
本文介绍了禁止清除消息(Makefile静默删除)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何避免在Makefile中产生一些回音:

I'm wondering how I can avoid some echo in a Makefile :

clean:
    rm -fr *.o

此规则将打印:

$>make clean   
rm -fr *.o

$>

如何避免这种情况?

推荐答案

实际上,我在寻找其他东西,将此行添加到Makefile中:

In fact I was looking for something else, adding this line to the Makefile :

.SILENT:clean

同时静默执行清理"目标的每一步.

while execute every step of the "clean" target silently.

直到有人指出此缺点,我才将其用作我最喜欢的解决方案!

Until someone point some drawback to this, I use this as my favourite solution!

这篇关于禁止清除消息(Makefile静默删除)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆