Skip to content
Snippets Groups Projects
Commit 1f98b0ae authored by Sebastian Fricke's avatar Sebastian Fricke
Browse files

funcs.sh: Wrapper for smatch install

parent 09fd6bcb
No related branches found
No related tags found
No related merge requests found
......@@ -270,15 +270,7 @@ set_doc_headers
cd $top
if [ $sparse == 1 -o $smatch == 1 -o ! -d smatch ]; then
if [ ! -d smatch ]; then
echo 'Smatch missing, run prepare_build.sh first'
exit 1
fi
cd smatch
git remote update
git reset --hard origin/master
make -j HAVE_LLVM=no
cd ..
build_smatch origin/master
fi
export CCACHE_MAXSIZE=512M
......
......@@ -78,6 +78,19 @@ function strip_top()
sed "s;$top/media-git/;;g"
}
function build_smatch()
{
if [ ! -d smatch ]; then
echo '`smatch` folder missing, run prepare_build.sh first'
exit 1
fi
cd smatch
git remote update
git reset --hard $1
make -j HAVE_LLVM=no
cd ..
return 0
}
function setup()
{
if [ ! -d media-git ]; then
......@@ -98,9 +111,7 @@ function setup()
git remote update
git checkout -b build-test media_stage/master
cd ..
git clone $smatch_git
cd smatch
make -j HAVE_LLVM=no
build_smatch origin/master
exit 0
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment