Skip to content

Commit 98089de

Browse files
committed
Add script to generate graphviz
1 parent 0847e2f commit 98089de

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
echo "digraph depends {" > depends.dot
2+
for f in `grep ALL_SOURCES Makefile.sources | cut -d= -f2`; do
3+
f2=`echo $f | cut -d/ -f3 | cut -d. -f1`
4+
echo " \"$f2\" [label=\"$f2\"];" >> depends.dot
5+
for i in `egrep "^ *(public|protected)? *import" "$f" | grep -o "import \+[A-Za-z0-9_]\+ *;" | cut -d" " -f2 | cut -d";" -f1`; do
6+
echo " \"$f2\" -> \"$i\";" >> depends.dot
7+
done
8+
for i in `egrep "^ *(public|protected)? *import" "$f" | grep -o "import \+[A-Za-z0-9_]\+ *= *[A-Za-z0-9_]\+ *;" | cut -d= -f2 | cut -d";" -f1`; do
9+
echo " \"$f2\" -> \"$i\";" >> depends.dot
10+
done
11+
done
12+
echo "}" >> depends.dot
13+
gv2gml depends.dot > depends.gml

0 commit comments

Comments
 (0)