5

Closely related to How to display dependencies given in a makefile as a tree? But the answers given there is not satisfactory (does not work).

Is there a tool to visualize the Directed Acylic Graphs (DAGs) coded up in standard Makefiles? eg, a shell-script for post-processing through Unix pipes can be an acceptable solution as well (maybe there is a pandoc filter to convert MakeFiles to graphviz or LaTeX).

I don't strictly need a tool that directly typesets this graphical visualisation? Just a common file-format translation of the makefile to a graph-viz file or something similar would suffice.

  • 1
    You can use dot etc. from the graphviz package to render DAGs. Transforming a (simple) makefile (explicit direct dependencies) into dot format is an exercise in shell programming, or perl etc. (split lines with colon in part before colon and part after colon). – dirkt Oct 25 '17 at 17:11
  • @dirkt, is there a rudimentary shell script available somewhere? I am really new to *nix programming – Krishna Oct 25 '17 at 17:26
  • Is your makefile recursive: does it include $(MAKE) or make. If so it will be slow, and generating this graph will be very very hard. (Recursion is usually good, but recursive make is bad.) – ctrl-alt-delor Jul 2 at 8:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.