radare2/libr/depgraph.pl
pancake f88fd507cd * fix r_asm and r_anal deps
* Initial import of depgraph.pl helper script to get the libr
  internal library dependencies graph with graphviz
2009-03-04 12:39:51 +00:00

16 lines
311 B
Bash

#!/bin/sh
#
# Usage : perl depgraph.pl | dot -Tpng /dev/stdin > deps.png
#
grep -e DEPS */Makefile |sed -e 's,/Makefile,,' > /tmp/rdeps.txt
echo "digraph G {";
cat /tmp/rdeps.txt | perl -ne '
/(.*):(.*)=(.*)$/;
my $lib=$1;
@deps=split(/ /, $3);
foreach $dep (@deps) {
print " $dep -> r_$lib;\n";
}';
echo "}";