绘制make生成的DAG图?

发布于 2024-09-03 07:57:18 字数 789 浏览 2 评论 0原文

我的理解是,当make执行时,它会在内部生成一个DAG来表示项目中的所有依赖项。有没有办法获取 DAG 并将其绘制成图表,比如使用 graphviz 之类的东西?

我在 Ubuntu 8.04 上使用 gnu make。

编辑

我刚刚遇到了这些名为的工具mamdagmamdot。它们应该与 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

花间憩 2024-09-10 07:57:18

您应该尝试使用 Makefile::GraphVizgvmake创建您想要的图表的实用程序

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

橘香 2024-09-10 07:57:18

对于代码方面, 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文