구차니 2014. 9. 12. 17:54
예전에 적은줄 알았는데 없네...


make 안에서

all:
    @gcc helloworld.c

이런식으로 구성하면
해당 구문의 명령은 출력되지 않고
에러 메시지만 출력하게 된다.

[링크 : http://stackoverflow.com/questions/3148492/makefile-silent-remove



Command Echoing

Normally make prints each command line before it is executed. We call this echoing because it gives the appearance that you are typing the commands yourself.

When a line starts with `@', the echoing of that line is suppressed. The `@' is discarded before the command is passed to the shell. Typically you would use this for a command whose only effect is to print something, such as an echo command to indicate progress through the makefile:

@echo About to make distribution files

When make is given the flag `-n' or `--just-print', echoing is all that happens, no execution. See section Summary of Options. In this case and only this case, even the commands starting with `@' are printed. This flag is useful for finding out which commands make thinks are necessary without actually doing them.

The `-s' or `--silent' flag to make prevents all echoing, as if all commands started with `@'. A rule in the makefile for the special target .SILENT without dependencies has the same effect (see section Special Built-in Target Names). .SILENT is essentially obsolete since `@' is more flexible.

[링크 : http://web.mit.edu/gnu/doc/html/make_5.html]