4 project
=$
(echo "$2" | cut
-d = -f 2)
6 if [[ "$file" = "" ]] ; then
7 echo "Usage: $0 <file with smatch messages> -p=<project>"
12 remove
=$
(echo ${bin_dir}/..
/smatch_data
/${project}.bit_shifters.remove
)
13 tmp
=$
(mktemp
/tmp
/smatch.XXXX
)
15 echo "// list of macros used as shifters." \
16 > ${project}.bit_shifters
17 echo '// generated by `gen_bit_shifters.sh`' >> ${project}.bit_shifters
18 grep "info: bit shifter" $file | cut
-s -d "'" -f 2- |
sed -e "s/'//g" |
sort -u > $tmp
20 cat $tmp $remove $remove 2> /dev
/null |
sort |
uniq -u >> ${project}.bit_shifters
22 echo "Done. List saved as '${project}.bit_shifters'"