绘制make生成的DAG图?
我的理解是,当make
执行时,它会在内部生成一个DAG来表示项目中的所有依赖项。有没有办法获取 DAG 并将其绘制成图表,比如使用 graphviz 之类的东西?
我在 Ubuntu 8.04 上使用 gnu make。
编辑
我刚刚遇到了这些名为的工具mamdag 和 mamdot。它们应该与 nmake 和 gnu make 一起使用,但我似乎找不到让 gnu make 吐出 mam 文件的选项。
可以在此处下载 - 这些软件包:
INIT
ast-基地
ast-gpl
刚刚发现 AT&T 的 Glenn Fowler 写的这篇文章 描述 MAM 语言 和 mamdot 工具。
看来你必须修补 gnu make 才能使其工作,尽管我还不是 100% 确定。
也许还有另一种方法?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您应该尝试使用
Makefile::GraphViz
的 gvmake创建您想要的图表的实用程序You should try using
Makefile::GraphViz
's gvmake utility to create the graphs you want对于代码方面, doxygen 将生成源文件和头文件之间的依赖关系图,如果您就是这样的话有兴趣的话,不用make。
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.