Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Graphing the DAG generated by make?

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?

like image 528
Robert S. Barnes Avatar asked Jun 01 '10 06:06

Robert S. Barnes


People also ask

How can you make a directed graph a DAG?

Any directed graph may be made into a DAG by removing a feedback vertex set or a feedback arc set, a set of vertices or edges (respectively) that touches all cycles.

What makes a graph a DAG?

A directed acyclic graph (DAG) is a conceptual representation of a series of activities. The order of the activities is depicted by a graph, which is visually presented as a set of circles, each one representing an activity, some of which are connected by lines, which represent the flow from one activity to another.

What is DAG flow graph?

The Directed Acyclic Graph (DAG) is used to represent the structure of basic blocks, to visualize the flow of values between basic blocks, and to provide optimization techniques in the basic block.

Is there any tool to make and analyze directed acyclic graphs DAG )?

You can use optaplanner for the same.


1 Answers

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

like image 124
Hasturkun Avatar answered Sep 22 '22 13:09

Hasturkun