我有一個很大的遺留代碼庫,其中包含非常複雜的makefile以及很多變量。有時候我需要改變它們,我發現很難弄清楚爲什麼變化不能按我期望的方式工作。我想找到的是一個基本上對「make」過程進行逐步調試的工具,在那裏我會給它一個目錄,並且我將能夠看到不同變量在不同點上的值處理。沒有一個調試標誌可以讓我看到我想要的東西,儘管可能我錯過了一些東西。有誰知道一種方法來做到這一點?用於調試makefile的工具
46
A
回答
48
您是否一直在尋找運行make -n
和make -np
以及biggie make -nd
的輸出?
您是否使用gmake
的相當新版本?
你看過O'Reilly網站上有關Debugging Makefiles的免費章節:他們出色的書「使用GNU Make管理項目」(Amazon Link)。
3
我不知道任何特定的標誌確實符合您的要求,但
--print-data-base聽起來像是有用的。
20
10
從對make命令行選項手冊頁:
-n, --just-print, --dry-run, --recon
Print the commands that would be executed, but do not execute them.
-d Print debugging information in addition to normal processing.
The debugging information says
which files are being considered for remaking,
which file-times are being compared and with what results,
which files actually need to be remade,
which implicit rules are considered and which are applied---
everything interesting about how make decides what to do.
--debug[=FLAGS] Print debugging information in addition to normal processing.
If the FLAGS are omitted, then the behaviour is the same as if -d was specified.
FLAGS may be:
'a' for all debugging output same as using -d,
'b' for basic debugging,
'v' for more verbose basic debugging,
'i' for showing implicit rules,
'j' for details on invocation of commands, and
'm' for debugging while remaking makefiles.
0
有一個在http://gmd.sf.net一個GNU調試器做項目,看起來相當有用。 gmd支持的主要功能是突出點,這可能比步進更有用。要使用這個,你從http://gmd.sf.net和gmsl從http://gmsl.sf.net下載gmd,然後在你的makefile中做一個'include gmd'。
相關問題
- 1. 用於調試WCF服務的工具
- 2. 用於調試的工具xslt
- 3. 用於調試的java工具
- 4. Makefile:用於比較的測試makefile
- 5. 調試Makefile
- 6. 調試/發佈從IDE調用的Makefile
- 7. WebGL調試工具?
- 8. Webkit調試工具
- 9. Mathematica調試工具
- 10. Java調試工具
- 11. javascript調試工具
- 12. StatET調試工具
- 13. 生成makefile的好工具?
- 14. Linux makefile調試庫
- 15. 用於調試的工具在Java應用程序中掛起
- 16. 用於從Eclipse的.cproject文件生成makefile的獨立工具?
- 17. Codeigniter的調試工具
- 18. 調試VerifyError的好工具?
- 19. 調試SOAP UI工具調用
- 20. 用於Windows的Microsoft調試工具中的符號?
- 21. 用於調試JavaScript中的內存泄漏的工具
- 22. 用於多處理的python調試工具
- 23. 用於調試linux內核的工具是什麼?
- 24. 什麼是可用於調試CSS的工具?
- 25. 用於調試存儲過程的獨立工具
- 26. 用於Firefox調試工具的多行模式?
- 27. 用於調試休眠配置的工具
- 28. 用於調試遞歸代碼的可視化工具
- 29. 用於JavaScript/xulrunner開發的最佳調試工具
- 30. 用於xCode的調試可視化工具
或`-p`作爲別名 – sercxjo 2016-04-13 20:26:21