How do I see the commands that are run by GNU make?

↘锁芯ラ 提交于 2019-12-08 17:08:12

问题


I'm trying to debug a complex Makefile. How do you get GNU make to print all the commands it runs? I couldn't find the answer in the man page (using the -d flag doesn't seem to print it).

(This isn't necessary information to answer my question, but in case you're wondering: I'm having trouble compiling a project built on NVIDIA's CUDA library. I can compile it myself, but using their Makefile results in a nasty compiler error. I'd like to use their provided Makefile for easier packaging, and inclusion of other packages that they link in already.)


回答1:


-n triggers a "dry run" in which no command is executed, though the commands which would execute are printed.

If your Makefile is recursive, though, this won't help much.



来源:https://stackoverflow.com/questions/1870538/how-do-i-see-the-commands-that-are-run-by-gnu-make

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!