diff options
author | John Hood <cgull@glup.org> | 2017-08-06 21:59:57 -0400 |
---|---|---|
committer | John Hood <cgull@glup.org> | 2017-08-06 21:59:57 -0400 |
commit | 4f068d726192a051d61095954f15faec1ade624b (patch) | |
tree | 13ce02e0e95840dc70619ff332ec34d245b26e55 /Makefile.am | |
parent | 271e8ba3181bf50b778b7047c0069aea2200b49a (diff) |
Improve targets for existing static checkers.
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/Makefile.am b/Makefile.am index ac0bb8f..f4914fb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,9 +2,11 @@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = scripts src man conf EXTRA_DIST = autogen.sh ocb-license.html README.md COPYING.iOS BUILT_SOURCES = version.h -CLANG_SCAN_BUILD = scan-build AM_DISTCHECK_CONFIGURE_FLAGS = --enable-compile-warnings=distcheck --enable-examples +# non-Automake defines +CPPCHECK_FLAGS = --enable=all --template=gcc --force # -j8 disables unused function checking. +CLANG_SCAN_BUILD = scan-build .PHONY: VERSION VERSION: @@ -29,17 +31,23 @@ version.h: VERSION clean-local: @rm -rf version.h VERSION cov-int mosh-coverity.txz -cppcheck: $(BUILT_SOURCES) config.h - cppcheck --enable=all --template=gcc -include config.h -I . \ +# Linters and static checkers, for development only. Not included in +# build dependencies, and outside of Automake processing. +cppcheck: + cppcheck $(CPPCHECK_FLAGS) -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) check && \ - tar -caf mosh-coverity.txz cov-int +# Coverity. +cov-build: + $(MAKE) clean + rm -rf cov-int + cov-build --dir cov-int $(MAKE) check TESTS= + tar -caf mosh-coverity.txz cov-int -scan-build: $(BUILT_SOURCES) config.h - $(MAKE) clean && $(CLANG_SCAN_BUILD) $(MAKE) check +# Clang's scan-build static checker. +scan-build: + $(MAKE) clean + $(CLANG_SCAN_BUILD) $(MAKE) check TESTS= |