如何在makefile中抑制回声?

时间:2009-05-15 05:22:45

标签: makefile gnu-make

我在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

1 个答案:

答案 0 :(得分:7)

您可以在命令之前添加“@”来抑制回声

install: 
        @echo /usr/bin/shelldecrypt must be writable
        cp shelldecrypt /usr/bin