I see that this is the same question as
Making cmake print commands before executing
But that answer doesn\'t work for me. I\'m guessing that answer only wor
By default, make
does print every command before executing it. This printing can be suppressed by one of the following mechanisms:
@
at the beginning of the command-s
, --silent
or --quiet
, as in $(MAKE) --silent -C someDir
, for example. From that moment on, command echoing is suppressed in the sub-make.If your makefile does not print the commands, then it is probably using one of these three mechanisms, and you have to actually inspect the makefile(s) to figure out which.
As a workaround to avoid these echo-suppressing mechanisms, you could re-define the shell to be used to use a debug mode, for example like make SHELL="/bin/bash -x" target
. Other shells have similar options. With that approach, it is not make
printing the commands, but the shell itself.
If you use the flag -n
or --just-print
, the echo-suppressing mechanisms will be ignored and you will always see all commands that make
thinks should be executed -- but they are not actually executed, just printed. That might be a good way to figure out what you can actually expect to see.
The VERBOSE
variable has no standard meaning for make
, but only if your makefile interprets it.
I think this is what you want: make MAKE_VERBOSE=1 target