Reputation: 369
I have ;
default :
gcc -o function function.c
When I type make in terminal, following message is emitted
user@user-laptop:~/Desktop$ make
gcc -o function function.c
user@user-laptop:~/Desktop$
But I want
user@user-laptop:~/Desktop$ make
user@user-laptop:~/Desktop$
How can I do that?
Upvotes: 26
Views: 14629
Reputation:
To tell Make to be quiet/silent for all the targets, put the following at the top of a Makefile, which will work as though make --silent
was used without requiring one to provide the switch on command line.
Works with GNU Make on Linux, I am not sure about all the other Make variants.
MAKEFLAGS += --silent
Upvotes: 3
Reputation: 206861
Use an @
to quiet the output:
default:
@gcc -o ...
You can find the documentation here: Recipe echoing. (Or you can invoke make
with make -s
to suppress all echoing.)
Upvotes: 37