Graphing the DAG generated by make?

限于喜欢 提交于 2019-12-03 12:30:27

问题


My understanding is that when make executes, it generates a DAG internally to represent all the dependencies in the project. Is there a way to get at that DAG and graph it, say using something like graphviz?

I'm using gnu make on Ubuntu 8.04.

EDIT

I just ran across these tools called mamdag and mamdot. They're supposed to work with both nmake and gnu make, but I can't seem to find the options to get gnu make to spit out the mam file.

It can be downloaded here - these packages:

INIT
ast-base
ast-gpl

Just found this article by Glenn Fowler at AT&T describing the MAM language and the mamdot tool.

It seems like you have to patch gnu make for this to work, although I'm not 100% certain yet.

Maybe there's another way?


回答1:


You should try using Makefile::GraphViz's gvmake utility to create the graphs you want




回答2:


For the code side of things, doxygen will produce dependency diagrams between source and header files, if that is what you are interested in, without the use of make.



来源:https://stackoverflow.com/questions/2947821/graphing-the-dag-generated-by-make

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