Taking an nmake project, specifically Ruby, and trying to see exactly what commands are used to build it. nmake says what files it is compiling, but not what commandline it is using to compile each file. The closest thing to an obviously relevant option is /D, but that doesn't shed much light on it.
Is there a way, by supplying some option to nmake or otherwise, to see exactly what commands it is issuing?
There is no general way of causing all the commands to be echoed, such as using a command option. However it is possible to build such an option by yourself, but it does involve making global edits to the Makefile. However, with clever use of an editor (such as one that matches regular expressions) you can quickly make the changes and get what you desire.
The technique is described in this Blog article: Writing Portable Makefiles, Section §5.
Every makefile implementation allows a command to be proceeded by an
@symbol which causes the echo to be disabled. The technique is to use a macro in place of the@symbol, such as in this example Makefile:This can be demonstrated thus:
Then, all that remains is to change every
@at the beginning of a command to '$(L)' (leaving all the other@symbols unchanged of course!).