Add static checkers to Makefile

Signed-off-by: John Hood <cgull@glup.org>
This commit is contained in:
John Hood
2015-06-10 22:13:13 -04:00
parent 8acee95c02
commit c58642dd63
+17 -1
View File
@@ -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)