Pushed : makefile2graph , creating a graph of dependencies from GNU-Make.
I pushed makefile2graph at https://github.com/lindenb/makefile2graph. This is the standalone and 'C' implementation of a program I first wrote in java in 2012. The program creates a graph of dependencies from GNU-Make and its output is a graphiz-dot file or a Gexf/Gephi-XML file.
Usage
$ make -Bnd | make2graph > output.dot $ make -Bnd | make2graph -x > gephi.gexf.xml
Example
Here is the output of makefile2graph for Tabix:$ cd tabix-0.2.5 $ make -Bnd |make2graph
digraph G { n1[label="", color="green"]; n2[label="Makefile", color="green"]; n4[label="all", color="red"]; n3[label="all-recur", color="red"]; n23[label="bedidx.c", color="green"]; n22[label="bedidx.o", color="red"]; n9[label="bgzf.c", color="green"]; n10[label="bgzf.h", color="green"]; n8[label="bgzf.o", color="red"]; n27[label="bgzip", color="red"]; n29[label="bgzip.c", color="green"]; n28[label="bgzip.o", color="red"]; n18[label="index.c", color="green"]; n17[label="index.o", color="red"]; n20[label="khash.h", color="green"]; n16[label="knetfile.c", color="green"]; n11[label="knetfile.h", color="green"]; n15[label="knetfile.o", color="red"]; n24[label="kseq.h", color="green"]; n21[label="ksort.h", color="green"]; n13[label="kstring.c", color="green"]; n14[label="kstring.h", color="green"]; n12[label="kstring.o", color="red"]; n6[label="lib", color="red"]; n7[label="libtabix.a", color="red"]; n26[label="main.c", color="green"]; n25[label="main.o", color="red"]; n5[label="tabix", color="red"]; n19[label="tabix.h", color="green"]; n2 -> n1 ; n4 -> n1 ; n3 -> n1 ; (..) }
That's it
Pierre
No comments:
Post a Comment