From 09bebcb1de0fea76be8653bed427712fb615a610 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 14 Jul 2015 23:51:44 -0700 Subject: Added clang-check target. --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8b8aebc..4c8577c 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ VERSION?=$(SPECVERSION) RELEASE?=CommonMark-$(VERSION) INSTALL_PREFIX?=/usr/local -.PHONY: all cmake_build spec leakcheck clean fuzztest dingus upload test update-site upload-site debug ubsan asan mingw archive bench astyle update-spec afl +.PHONY: all cmake_build spec leakcheck clean fuzztest dingus upload test update-site upload-site debug ubsan asan mingw archive bench astyle update-spec afl clang-check all: cmake_build man/man3/cmark.3 @@ -36,7 +36,8 @@ $(BUILDDIR): cmake .. \ -G "$(GENERATOR)" \ -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) \ - -DCMAKE_INSTALL_PREFIX=$(INSTALL_PREFIX) + -DCMAKE_INSTALL_PREFIX=$(INSTALL_PREFIX) \ + -DCMAKE_EXPORT_COMPILE_COMMANDS=ON install: $(BUILDDIR) make -C $(BUILDDIR) install @@ -77,6 +78,9 @@ afl: -t 100 \ $(CMARK) $(CMARK_OPTS) +clang-check: + find src -name '*.c' | xargs $$CLANG_CHECK_PATH/bin/clang-check -p build -analyze + mingw: mkdir -p $(MINGW_BUILDDIR); \ cd $(MINGW_BUILDDIR); \ -- cgit v1.2.3