3 export SCRIPT_BASE
=$
(dirname `readlink -f $0`)
4 export BASE
=${SCRIPT_BASE}/..
5 export BUILD
=${BASE}/build
8 CLANG_ANALYZER
=/usr
/share
/clang
/scan-build-
${CLANG_VERSION}/libexec
/c
++-analyzer
9 CLANG_SCAN_BUILD
=/usr
/share
/clang
/scan-build-
${CLANG_VERSION}/bin
/scan-build
10 CLANG_COMPILER
=/usr
/bin
/clang
++-${CLANG_VERSION}
12 if [ ! -x ${CLANG_ANALYZER} ] ; then
13 echo "error: clang analyzer not found: ${CLANG_ANALYZER}"
17 if [ ! -x ${CLANG_SCAN_BUILD} ] ; then
18 echo "error: clang scan build not found: ${CLANG_SCAN_BUILD}"
22 if [ ! -x ${CLANG_COMPILER} ] ; then
23 echo "error: clang compiler not found: ${CLANG_COMPILER}"
27 if [ -d ${BUILD} ] ; then
29 echo "warning: directory 'build' already exists."
35 if [ ! -d ${BUILD}/doc
/analysis
] ; then
36 mkdir
-p ${BUILD}/doc
/analysis
40 cmake
-DCMAKE_CXX_COMPILER=${CLANG_ANALYZER} ..
41 ${CLANG_SCAN_BUILD} -o doc
/analysis
--use-analyzer=${CLANG_COMPILER} make -j 4 marnav