summaryrefslogtreecommitdiff
path: root/toolbin/gen_include_dep_graph.sh
blob: 71629447c4621fd4e88ef0df3879a524b22a294f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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