What is the meaning of '@' in Makefile?

Harry asked:

What is the meaning of '@' in Makefile? An example is as follows.

$ cat Makefile
all:
    @echo "For correctness test of basic get and put, run: make test;"

Without '@', it works well.

asked Apr 9, 2014 by Eric Z Ma (44,280 points)

1 Answer

 
Best answer

Without @:

$ make
echo "For correctness test of basic get and put, run: make test;"
For correctness test of basic get and put, run: make test;

With @:

$ make
For correctness test of basic get and put, run: make test;

The difference is clear: with @, make will not print out the command that it executes.

answered Apr 9, 2014 by Eric Z Ma (44,280 points)

Got it, thank you.

commented Apr 9, 2014 by harryxiyou (5,740 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...