github/workflows/pycopy-test: Upgrade Pycopy to 3.6.1.
[ScratchABlock.git] / make_callgraph.sh
blobeccb8f3ed8714d5b6be67106b5693ba737bb80e0
1 #!/bin/sh
3 # Make a call graph in a .dot format for a number of functions
4 # in PseudoC assembler format, one function per a .lst file,
5 # put under the single directory.
7 # Usage: ./make_callgraph <directory_of_lsts>
9 # Generated callgraph will be in <directory_of_lsts>/callgraph.dot
12 set -e
14 DIR=$(dirname $0)
16 funcdir="$1"
17 shift
19 $DIR/correct_internal_entrypoint.py $funcdir
20 $DIR/apply_xform.py --script script_callgraph --format none $funcdir
21 $DIR/apply_xform.py --script script_callgraph_func_refs --format none $funcdir
22 $DIR/funcdb_dot.py $funcdir/funcdb.yaml -o $funcdir/callgraph.dot "$@"
23 $DIR/funcdb_util.py $funcdir/funcdb.yaml called_by