gvmake - A make tool that generates pretty graphs from Makefiles
# print usage info to stdout: gvmake -h # if the default target is 'all', the following # command will generate all.png gvmake # this command will generate 'test.png' where # 'test' is a target defined in the Makefile: gvmake test # override the default output file name: gvmake -o make.png test # specify the Makefile name explicitly: gvmake -f t/Makefile.old install # generate Makefile.png which contains all the goals gvmake -a # specify the size of the output image: gvmake -s 5x8 # width is 5 inch, and height is 8 inch # use neato rather than the default dot layout program: gvmake -o foo.dot -f foo.mk -a neato -o a.png -Tpng foo.dot
This is a make tool that generates pretty graphs for the building process according to user's Makefile instead of actually building something. It is a simple command-line frontend for the Makefile::GraphViz module.
For GNU makefile, it's highly recommended to use Makefile::Parser's makesimple script to convert your GNU makefile to the simplest form before running this script. Because this Makefile::GraphViz uses the toy Makefile::Parser engine which can only handle a very limited set of GNU makefile features while the Makefile::Parser::GmakeDB engine used by the makesimple script reuses the GNU make executable to do the (first-pass) parsing.
Thus you normally should do something like this:
cd dir_where_your_project_lives makesimple -f your_makefile > simplest.mk gvmake -f simplest.mk some_target
Currently only PNG format and the default settings for the graph style are used. This inflexible design will be changed soon.
Add more command-line options to control the graph appearance
To support more output file format
Add support for multiple goals passed in via command-line.
Please report bugs or send wish-list to http://rt.cpan.org/NoAuth/Bugs.html?Dist=Makefile-GraphViz.
Zhang "agentzh" Yichun, <email@example.com>
COPYRIGHT AND LICENSE
Copyright (C) 2005, 2006, 2007 by Zhang "agentzh" Yichun. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.