Try to make scan-build.mk work without scan-build installed.

This commit is contained in:
Peter Jones 2020-12-07 14:30:37 -05:00
parent f16c7dc632
commit e943efbb5f

View File

@ -1,9 +1,6 @@
SCAN_BUILD ?= $(shell x=$$(which --skip-alias --skip-functions scan-build 2>/dev/null) ; [ -n "$$x" ] && echo 1) SCAN_BUILD ?= $(shell x=$$(which --skip-alias --skip-functions scan-build 2>/dev/null) ; [ -n "$$x" ] && echo "$$x")
ifeq ($(SCAN_BUILD),)
SCAN_BUILD_ERROR = $(error scan-build not found)
endif
scan-test : ; $(SCAN_BUILD_ERROR) scan-test : ; $(if $(findstring /,$(SCAN_BUILD)),,$(error scan-build not found))
scan-clean : scan-clean :
@if [[ -d scan-results ]]; then rm -rf scan-results && echo "removed 'scan-results'"; fi @if [[ -d scan-results ]]; then rm -rf scan-results && echo "removed 'scan-results'"; fi