lindenb / makefile2graph

Creates a graph of dependencies from GNU-Make; Output is a graphiz-dot file or a Gexf-XML file.
MIT License
617 stars 63 forks source link

Show processes as well as inputs and outputs #20

Open CMCDragonkai opened 6 years ago

CMCDragonkai commented 6 years ago

Before I found this, I found this: https://github.com/TomConlin/MakefileViz

When I used this I found that processes themselves were not visualised. It would be quite cool if it showed the processes that were used as well in between inputs and outputs. I realise that each recipe itself would be considered a process, where the recipes call other processes. Later in the future, this can be used to visualise to create subgraphs within a larger graph.

richelbilderbeek commented 2 years ago

Me too enjoy the suggestion!

To give a user test case, if the Makefile would be:

output.txt: input.txt
  Rscript do_it.R

The graph should be something along the lines of:

digraph g {
    A -> B;
    A [label="input.txt"];
    B [label="output.txt"];
    A -> B [label="Rscript do_it.R"];
}

I do volunteer to test.