Module: check_mk
Branch: master
Commit: 74e2108dc004932b713519f2f7b3e13a061be2f2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=74e2108dc00493…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Thu May 19 12:13:05 2016 +0200
Use real file list for cppcheck.
---
Makefile | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 3a4ca43..dda6330 100644
--- a/Makefile
+++ b/Makefile
@@ -299,8 +299,10 @@ analyze: livestatus/config.h
cd livestatus && $(SCAN_BUILD) -o ../clang-analyzer $(MAKE)
CXXFLAGS="-std=c++14"
# TODO: Repeating the include paths here is ugly and fragile.
-cppcheck: livestatus/config.h
- @$(CPPCHECK) --quiet -UCMC --enable=all --inline-suppr --template=gcc -I livestatus/src
-I livestatus livestatus
+cppcheck: compile_commands.json
+ @./compiled_sources | \
+ sed 's/^"\(.*\)"$$/\1/' | \
+ @$(CPPCHECK) --quiet -UCMC --enable=all --inline-suppr --template=gcc -I livestatus/src
-I livestatus --file-list=-
# TODO: We should probably handle this rule via AM_EXTRA_RECURSIVE_TARGETS in
# src/configure.ac, but this needs at least automake-1.13, which in turn is only