math: remove the get_implied_value_low_overhead() function
[smatch.git] / smatch_scripts / gen_implicit_dependencies.sh
blobbb6217437507c8819b202474c8ad4e4da7b6b6ea
1 #!/bin/bash
3 file=$1
4 project=$(echo "$2" | cut -d = -f 2)
6 if [[ "$file" = "" ]] ; then
7 echo "Usage: $0 <file with smatch messages> -p=<project>"
8 exit 1
9 fi
11 if [[ "$project" != "kernel" ]] ; then
12 exit 0
15 bin_dir=$(dirname $0)
16 remove=$(echo ${bin_dir}/../smatch_data/kernel.implicit_dependencies.remove)
17 tmp=$(mktemp /tmp/smatch.XXXX)
19 # echo "// list of syscalls and the fields they write/read to." > kernel.implicit_dependencies
20 # echo '// generated by `gen_implicit_dependencies.sh`' >> kernel.implicit_dependencies
21 grep -w read_list $file >> $tmp
22 grep -w write_list $file >> $tmp
23 # cat $tmp $remove $remove 2> /dev/null | sort | uniq -u >> kernel.implicit_dependencies
24 cat $tmp >> kernel.implicit_dependencies
25 rm $tmp
26 echo "Done. List saved as 'kernel.implicit_dependencies"