summaryrefslogtreecommitdiff
path: root/toolbin/gen_include_dep_graph.sh
diff options
context:
space:
mode:
Diffstat (limited to 'toolbin/gen_include_dep_graph.sh')
-rwxr-xr-xtoolbin/gen_include_dep_graph.sh19
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 "}"
contact: Jan Huwald // Impressum