1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

makefiles/scan-build: Produce an error when doing 'scan-build-analyze'

This makes doing 'scan-build-analyze' produce an error at execution if
WERROR=1.

When used from `scan-build` it will not procude an error to display the result
webpage.
This commit is contained in:
Gaëtan Harter 2018-11-14 13:01:09 +01:00
parent ea3c1661f3
commit 50f58bfb07
No known key found for this signature in database
GPG Key ID: 76DF6BCF1B1F883B

View File

@ -34,11 +34,15 @@ SCANBUILD_ENV_VARS := \
USER \
#
# Produce errors by default at the end of compilation when warning are found
SCANBUILD_ERROR ?= $(if $(filter 1,$(WERROR)),--status-bugs)
SCANBUILD_ARGS ?= \
-analyze-headers \
--use-cc=$(CC) \
--use-c++=$(CXX) \
-analyzer-config stable-report-filename=true \
$(SCANBUILD_ERROR) \
#
SCANBUILD_OUTPUTDIR = scan-build/$(BOARD)
@ -63,6 +67,10 @@ else # INSIDE_DOCKER
scan-build: ..scan-build-view
endif # INSIDE_DOCKER
# Prevent 'analyze' from producing an error when doing 'scan-build' and
# still show the webpage for interractive checking.
scan-build: SCANBUILD_ERROR=
ifeq ($(BUILD_IN_DOCKER),1)
# It will trigger executing 'scan-build' or 'scan-build-analyze' with docker
scan-build-analyze: ..in-docker-container