xref: /aosp_15_r20/external/google-fruit/extras/doc/extract_dependencies.sh (revision a65addddcf69f38db5b288d787b6b7571a57bb8f)
1#!/bin/bash
2
3echo "// Running from dir $PWD"
4echo 'digraph g {'
5for f in $(ls *.cpp *.h)
6do
7  echo "$(echo "$f" | sed 's/\./_/g') [label=\"$f\"]"
8  for g in $(fgrep -l "#include \"$f\"" *)
9  do
10    echo "$g -> $f" | sed 's/\./_/g'
11  done
12done
13echo '}'
14