From 27450609508d171f089a309a498ad927a71a3941 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Fri, 14 Jun 2019 12:44:15 -0700 Subject: [PATCH] SCANBUILD can be defined before calling `make staticAnalyze` --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 98dc1ee..e23ba72 100644 --- a/Makefile +++ b/Makefile @@ -228,9 +228,10 @@ usan: ## check CLI runtime for undefined behavior, using clang's sanitizer $(MAKE) test CC=$(CC) MOREFLAGS="-g -fsanitize=undefined -fno-sanitize-recover=all" .PHONY: staticAnalyze -staticAnalyze: clean ## check C source files using scan-build static analyzer - @echo ---- static analyzer - scan-build ---- - CFLAGS="-g -Werror" scan-build --status-bugs -v $(MAKE) all +SCANBUILD = scan-build +staticAnalyze: clean ## check C source files using $(SCANBUILD) static analyzer + @echo ---- static analyzer - $(SCANBUILD) ---- + CFLAGS="-g -Werror" $(SCANBUILD) --status-bugs -v $(MAKE) all CPPCHECK = cppcheck .PHONY: cppcheck