get rid of FUNCTION_CALL_AFTER_HOOK
[smatch.git] / smatch_scripts / kchecker
blob70ff29c54c850aa213ccbf965e683a9109edebf1
1 #!/bin/bash
3 function useage {
4 echo "Usage: $0 [--debug][--valgrind] path/to/file.c"
5 exit 1
8 CMD=smatch
10 while true ; do
11 if [[ "$1" == "--debug" ]] ; then
12 POST="$POST --debug"
13 shift
14 elif [[ "$1" == "--debug-implied" ]] ; then
15 POST="$POST --debug-implied"
16 shift
17 elif [[ "$1" == "--valgrind" ]] ; then
18 PRE="valgrind"
19 shift
20 elif [[ "$1" == "--sparse" ]] ; then
21 CMD="sparse"
22 shift
23 else
24 break
26 done
28 cname=$1
29 if [[ "$cname" == "" ]] ; then
30 useage
32 if ! test -e $cname ; then
33 useage
36 oname=$(echo ${cname/.c/.o})
37 rm -f $oname
38 make C=y CHECK="$PRE $CMD $POST" $oname