有人知道从Makefile生成点(graphviz)文件的工具吗?

时间:2011-05-17 14:44:57

标签: makefile generator graphviz dot

给定Makefile(本例中不需要命令):

program: src0.o src1.o

src0.o: src0.c src0.h

src1.o: src1.c src1.h src0.h

有没有人知道可以生成点文件的工具?

如下:

digraph "Dependencies" {
"src0.h" -> "src0.o";
"src0.h" -> "src1.o";
"src1.h" -> "src1.o";
"src0.c" -> "src0.o";
"src1.c" -> "src1.o";
"src0.o" -> "program";
"src1.o" -> "program";
}

请注意,此工具也可以足够智能地快捷.o文件,并假装c文件依赖于它们包含的标头。

digraph "Dependencies" {
"src0.h" -> "src0.c";
"src0.h" -> "src1.c";
"src1.h" -> "src1.c";
"src0.c" -> "program";
"src1.c" -> "program";
}

1 个答案:

答案 0 :(得分:8)

使用GraphViz创建Makefile图表?这样做你需要的吗?

https://metacpan.org/pod/Makefile::GraphVizhttps://metacpan.org/pod/GraphViz::Makefile