diff options
author | Jan Huwald <jh@sotun.de> | 2012-05-07 20:01:51 (GMT) |
---|---|---|
committer | Jan Huwald <jh@sotun.de> | 2012-05-07 20:01:51 (GMT) |
commit | 420d2ef464d4a741028e132e662d5626806a41f5 (patch) | |
tree | 1aca6eb512e4ed0fb5f3c10c528cb998b6ffd695 /toolbin/gen_include_dep_graph.sh |
Diffstat (limited to 'toolbin/gen_include_dep_graph.sh')
-rwxr-xr-x | toolbin/gen_include_dep_graph.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/toolbin/gen_include_dep_graph.sh b/toolbin/gen_include_dep_graph.sh new file mode 100755 index 0000000..7162944 --- /dev/null +++ b/toolbin/gen_include_dep_graph.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +echo " + +digraph { +rankdir=LR" + +for src in $@; do + # do not include test cases (it makes the graph to dense) + if ! echo $src | grep -q test; then + # only display nodes which use another file (or are used) +# if [ -n "$(grep '#include \"' $src | grep -v '/')" ]; then + echo $(echo $src|tr .- __) ' [label=" '$src' "]' + grep '#include "' $src | grep -v '/' | sed 's/^.*"\([^"]*\)"$/'$src' #> \1/' | tr '#.-' '-__' +# fi + fi +done + +echo "}" |