Suppress messages in make clean (Makefile silent remove)

后端 未结 5 2052
感情败类
感情败类 2021-01-30 13:10

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

clean:
    rm -fr *.o

this rule will print:

$>make clean   
rm -fr          


        
5条回答
  •  花落未央
    2021-01-30 13:22

    If you put an @ in front of the command, it doesn't echo onto the shell. Try changing rm to @rm. (Reference)

提交回复
热议问题