Jun 14, 2017

[make][makefile] @ at the beginning of recipe line


https://www.gnu.org/software/make/manual/make.html#Recipe-Echoing

https://stackoverflow.com/a/3477400


They control the behaviour of make for the tagged command lines:
  • @ suppresses the normal 'echo' of the command that is executed.
  • - means ignore the exit status of the command that is executed (normally, a non-zero exit status would stop that part of the build).
  • + means 'execute this command under make -n' (when commands are not normally executed).
The + notation is a generalization of the mechanism whereby a command containing ${MAKE} or $(MAKE) is executed under make -n.
(@ is discussed in §5.2 of the manual you link to; - is described in §5.5; and §5.7.1 mentions the use of +.)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.