aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile.am
diff options
context:
space:
mode:
authorGravatar John Hood <cgull@glup.org>2015-06-10 22:13:13 -0400
committerGravatar John Hood <cgull@glup.org>2015-06-10 23:54:50 -0400
commitc58642dd63b8d359a44bdf1197df7b8405e25d94 (patch)
tree03347d4c41acf585ab6e718a710f51ab505c71ec /Makefile.am
parent8acee95c0280e8b18b53ffeba3986b6606e8858c (diff)
Add static checkers to Makefile
Signed-off-by: John Hood <cgull@glup.org>
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am18
1 files changed, 17 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 930fcfa..1d7b297 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,6 +3,7 @@ SUBDIRS = src scripts man conf
EXTRA_DIST = autogen.sh ocb-license.html README.md COPYING.iOS
nodist_noinst_HEADERS = version.h
BUILT_SOURCES = version.h
+CLANG_SCAN_BUILD = scan-build
.PHONY: VERSION
@@ -21,4 +22,19 @@ version.h: VERSION
@rm -f version.h.new
clean-local:
- @rm -f version.h VERSION
+ @rm -rf version.h VERSION cov-int mosh-coverity.txz
+
+cppcheck: $(BUILT_SOURCES) config.h
+ cppcheck --enable=all --template=gcc -include config.h -I . \
+ -I src/crypto -I src/frontend -I src/network -I src/protobufs \
+ -I src/statesync -I src/terminal -I src/util \
+ -I /usr/include -I /usr/include/google/protobuf -I/usr/include/openssl \
+ .
+
+cov-build: $(BUILT_SOURCES) config.h
+ $(MAKE) clean && rm -rf cov-int && \
+ cov-build --dir cov-int $(MAKE) && \
+ tar -caf mosh-coverity.txz cov-int
+
+scan-build: $(BUILT_SOURCES) config.h
+ $(MAKE) clean && $(CLANG_SCAN_BUILD) $(MAKE)