scons2dot.py

This is a simple python program meant to vizualize build dependencies. It grabs scons --tree=all output and converts it to a graphviz dot graph. The current version of scons2dot.py is found here (HTML scons2dot.html).

Example:

+-call
  +-call.o
  | +-call.s
  | | +-call.c
  | | +-/usr/bin/g++
  | +-/usr/bin/g++
  +-/usr/bin/g++


+-dbxml:call.o.xml
  +-call.o.xml
  | +-call.s
  | | +-call.c
  | | +-/usr/bin/g++
  | +-/home/dww4s/research/metaman/mm_v2/bin/metaman_asm.py
  +-scons.dbxml
  +-/home/dww4s/research/metaman/mm_v2/bin/manage_container

Gets converted to the following using dot:

builddep.dot.png

Using the command:

scons --tree=all -n | scons2dot.py

Note that scons2dot.py uses the basename of the entry as the label, though the entire string is stored in the Node data structure. If the --save option is used, the dot output is saved to a temp file, dot is invoked, and the resulting file is saved, as specified by --outfile.

Invoke scons2dot.py -h for more info on command options.

TODO


author:Dan Williams (dan_williams@cs.virginia.edu)
Homepage:http://www.cs.virginia.edu/~dww4s
Last doc rebuild:
 02-07-09
copyright:University of Virginia, 2009
license:BSD
version:0.1
python version:2.4