Print this page
12166 resync smatch to 0.6.1-rc1-il-3


  42 fi
  43 
  44 # If someone is building the database for the first time then make sure all the
  45 # required packages are installed
  46 if [ ! -e smatch_db.sqlite ] ; then
  47     [ -e smatch_warns.txt ] || touch smatch_warns.txt
  48     if ! $SCRIPT_DIR/../smatch_data/db/create_db.sh -p=$PROJECT smatch_warns.txt ; then
  49         echo "Hm... Not working.  Make sure you have all the sqlite3 packages"
  50         echo "And the sqlite3 libraries for Perl and Python"
  51         exit 1
  52     fi
  53 fi
  54 
  55 if [[ ! -z $ARCH ]]; then
  56         KERNEL_ARCH="ARCH=$ARCH"
  57 fi
  58 if [[ ! -z $CROSS_COMPILE ]] ; then
  59         KERNEL_CROSS_COMPILE="CROSS_COMPILE=$CROSS_COMPILE"
  60 fi
  61 
  62 make $KERNEL_ARCH $KERNEL_CROSS_COMPILE -j${NR_CPU} CHECK="$BIN_DIR/smatch --call-tree --info --param-mapper --spammy --file-output" $TARGET
  63 
  64 find -name \*.c.smatch -exec cat \{\} \; -exec rm \{\} \; > smatch_warns.txt
  65 
  66 for i in $SCRIPT_DIR/gen_* ; do
  67         $i smatch_warns.txt -p=${PROJECT}
  68 done
  69 
  70 mkdir -p $DATA_DIR
  71 mv $PROJECT.* $DATA_DIR
  72 
  73 $SCRIPT_DIR/../smatch_data/db/create_db.sh -p=$PROJECT smatch_warns.txt
  74 


  42 fi
  43 
  44 # If someone is building the database for the first time then make sure all the
  45 # required packages are installed
  46 if [ ! -e smatch_db.sqlite ] ; then
  47     [ -e smatch_warns.txt ] || touch smatch_warns.txt
  48     if ! $SCRIPT_DIR/../smatch_data/db/create_db.sh -p=$PROJECT smatch_warns.txt ; then
  49         echo "Hm... Not working.  Make sure you have all the sqlite3 packages"
  50         echo "And the sqlite3 libraries for Perl and Python"
  51         exit 1
  52     fi
  53 fi
  54 
  55 if [[ ! -z $ARCH ]]; then
  56         KERNEL_ARCH="ARCH=$ARCH"
  57 fi
  58 if [[ ! -z $CROSS_COMPILE ]] ; then
  59         KERNEL_CROSS_COMPILE="CROSS_COMPILE=$CROSS_COMPILE"
  60 fi
  61 
  62 make $KERNEL_ARCH $KERNEL_CROSS_COMPILE -j${NR_CPU} CHECK="$BIN_DIR/smatch --call-tree --info --spammy --file-output" $TARGET
  63 
  64 find -name \*.c.smatch -exec cat \{\} \; -exec rm \{\} \; > smatch_warns.txt
  65 
  66 for i in $SCRIPT_DIR/gen_* ; do
  67         $i smatch_warns.txt -p=${PROJECT}
  68 done
  69 
  70 mkdir -p $DATA_DIR
  71 mv $PROJECT.* $DATA_DIR
  72 
  73 $SCRIPT_DIR/../smatch_data/db/create_db.sh -p=$PROJECT smatch_warns.txt
  74