summaryrefslogtreecommitdiff
path: root/Make.scan-build
diff options
context:
space:
mode:
authorMathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>2018-07-24 16:24:23 -0400
committerMathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>2018-07-24 16:24:23 -0400
commitf892ac66084ab0315adb0c52e4a39b518730d023 (patch)
tree0b41430bab3e1cf51e37476a5e6548f639cb7ec6 /Make.scan-build
parent6215e920e71f5c6c43189f27b755e7a3238ad396 (diff)
downloadefi-boot-shim-upstream/15+1531942534.dd3230d.tar.gz
efi-boot-shim-upstream/15+1531942534.dd3230d.zip
New upstream version 15+1531942534.dd3230dupstream/15+1531942534.dd3230d
Diffstat (limited to 'Make.scan-build')
-rw-r--r--Make.scan-build20
1 files changed, 20 insertions, 0 deletions
diff --git a/Make.scan-build b/Make.scan-build
new file mode 100644
index 00000000..4177906e
--- /dev/null
+++ b/Make.scan-build
@@ -0,0 +1,20 @@
+SCAN_BUILD ?= $(shell x=$$(which --skip-alias --skip-functions scan-build 2>/dev/null) ; [ -n "$$x" ] && echo 1)
+ifeq ($(SCAN_BUILD),)
+ SCAN_BUILD_ERROR = $(error scan-build not found)
+endif
+
+scan-test : ; $(SCAN_BUILD_ERROR)
+
+scan-clean :
+ @if [[ -d scan-results ]]; then rm -rf scan-results && echo "removed 'scan-results'"; fi
+
+scan-build : | scan-test
+scan-build : clean-shim-objs
+ make $(DASHJ) Cryptlib/OpenSSL/libopenssl.a Cryptlib/libcryptlib.a
+ scan-build -o scan-results make $(DASHJ) CC=clang all
+
+scan-build-all : | scan-test
+scan-build-all : clean
+ scan-build -o scan-results make $(DASHJ) CC=clang all
+
+.PHONY : scan-build scan-clean