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 ...@@ -270,15 +270,7 @@ set_doc_headers
cd $top cd $top
if [ $sparse == 1 -o $smatch == 1 -o ! -d smatch ]; then if [ $sparse == 1 -o $smatch == 1 -o ! -d smatch ]; then
if [ ! -d smatch ]; then build_smatch origin/master
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 ..
fi fi
export CCACHE_MAXSIZE=512M export CCACHE_MAXSIZE=512M
......
...@@ -78,6 +78,19 @@ function strip_top() ...@@ -78,6 +78,19 @@ function strip_top()
sed "s;$top/media-git/;;g" 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() function setup()
{ {
if [ ! -d media-git ]; then if [ ! -d media-git ]; then
...@@ -98,9 +111,7 @@ function setup() ...@@ -98,9 +111,7 @@ function setup()
git remote update git remote update
git checkout -b build-test media_stage/master git checkout -b build-test media_stage/master
cd .. cd ..
git clone $smatch_git build_smatch origin/master
cd smatch
make -j HAVE_LLVM=no
exit 0 exit 0
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment