comparison libtomcrypt/scan_build.sh @ 1471:6dba84798cd5

Update to libtomcrypt 1.18.1, merged with Dropbear changes
author Matt Johnston <matt@ucc.asn.au>
date Fri, 09 Feb 2018 21:44:05 +0800
parents
children
comparison
equal deleted inserted replaced
1470:8bba51a55704 1471:6dba84798cd5
1 #!/bin/bash
2 [ "$TRAVIS_CI" != "" ] && { [ -z "$(which scan-build)" ] && { echo "installing clang"; sudo apt-get install clang -y -qq; }; } || true
3
4 if [ "$#" = "5" -a "$(echo $3 | grep -v 'makefile[.]')" = "" ]; then
5 echo "only run $0 for the regular makefile, early exit success"
6 exit 0
7 fi
8
9 # output version
10 bash printinfo.sh
11
12 make clean > /dev/null
13
14 scan_build=$(which scan-build)
15 [ -z "$scan_build" ] && scan_build=$(find /usr/bin/ -name 'scan-build-*' | sort -nr | head -n1) || true
16 [ -z "$scan_build" ] && { echo "couldn't find clang scan-build"; exit 1; } || echo "run $scan_build"
17 export CFLAGS="-DUSE_LTM -DLTM_DESC -I/usr/include"
18 export EXTRALIBS="-ltommath"
19 $scan_build --status-bugs make -f makefile.unix all CFLAGS="$CFLAGS" EXTRALIBS="$EXTRALIBS"