22

Is there a way to have make echo commands that are manually suppressed with @ in the makefile? I can't find this in the help or man page, it just says "--quiet" to do the opposite.

1

2 Answers 2

27
  • The most obvious idea is to change the shell that runs the commands, e.g. modify your makefile and add to the top SHELL = sh -xv.
  • Another solution is to change how you call make to make SHELL='sh -xv'
  • Lastly if your Makefile is generated by cmake then call make with make VERBOSE=1
Sign up to request clarification or add additional context in comments.

6 Comments

I found out that the nVidia SDK makefiles actually have a VERBOSE option (so make VERBOSE= works), but this is an awesome and more general solution! Thanks!
SHELL = sh -xv isn't doing anything for me. neither (SHELL="sh -xv" make) nor (export SHELL="sh -xv" && make)
@gman: You need it to include it into the make command (make SHELL='sh -xv' or into the Makefile.
-v had no effect on Dash 0.5.7 (Ubuntu 14.04), I think because it ignores -c commands, which is how Make must be running them. Works for GNU Bash though.
A side effect of this approach is that it echoes any function exports that may be in the user's .bashrc contents for each shell instantiation.
|
11

I run into this question from time to time using cmake because it hides the command. You can use "make VERBOSE=true" to get them to print out.

2 Comments

Thanks, I did find this out for the SDK.
This entirely depends on the Makeflile at hand.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.