Module: check_mk
Branch: master
Commit: 1ff8f15b687863d8edf2b916b5f65e1009934ff2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1ff8f15b687863…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Wed Feb 8 11:46:28 2017 +0100
Unbreak cppcheck target
Change-Id: I1f59906db2d182012536a7afba53bfdc2f787360
---
.gitignore | 1 -
Makefile | 20 +++++++++++++++++---
livestatus/.gitignore | 1 +
3 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/.gitignore b/.gitignore
index 9332ce5..adb08e1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,7 +31,6 @@ config.log
config.status
config.sub
configure
-cppcheck-result.xml
depcomp
install-sh
missing
diff --git a/Makefile b/Makefile
index 9bc1878..529a33c 100644
--- a/Makefile
+++ b/Makefile
@@ -444,14 +444,28 @@ analyze: config.h
# GCC-like output on stderr intended for human consumption.
cppcheck: compile_commands.json
@scripts/compiled_sources | \
+ grep /livestatus/src/ |\
sed 's/^"\(.*\)"$$/\1/' | \
- $(CPPCHECK) --max-configs=16 -UCMC --enable=all --suppress=missingIncludeSystem
--inline-suppr -I livestatus/src -I livestatus --file-list=- --quiet --template=gcc
+ ( cd livestatus && $(CPPCHECK) -DHAVE_CONFIG_H -UCMC --enable=all
--suppress=missingIncludeSystem --inline-suppr -I src -I .. -I . --file-list=- --quiet
--template=gcc )
+ifeq ($(ENTERPRISE),yes)
+ @scripts/compiled_sources | \
+ grep /enterprise/core/ |\
+ sed 's/^"\(.*\)"$$/\1/' | \
+ ( cd enterprise/core/src && $(CPPCHECK) -DHAVE_CONFIG_H -DCMC --enable=all
--suppress=missingIncludeSystem --inline-suppr -I . -I ../../.. -I livestatus -I
checkhelper --file-list=- --quiet --template=gcc )
+endif
# XML output into file intended for machine processing.
cppcheck-xml: compile_commands.json
- @./compiled_sources | \
+ scripts/compiled_sources | \
+ grep /livestatus/src/ |\
sed 's/^"\(.*\)"$$/\1/' | \
- $(CPPCHECK) --max-configs=16 -UCMC --enable=all --suppress=missingIncludeSystem
--inline-suppr -I livestatus/src -I livestatus --file-list=- --quiet --template=gcc --xml
--xml-version=2 2> cppcheck-result.xml
+ ( cd livestatus && $(CPPCHECK) -DHAVE_CONFIG_H -UCMC --enable=all
--suppress=missingIncludeSystem --inline-suppr -I src -I .. -I . --file-list=- --quiet
--template=gcc --xml --xml-version=2 2> cppcheck-result.xml )
+ifeq ($(ENTERPRISE),yes)
+ scripts/compiled_sources | \
+ grep /enterprise/core/ |\
+ sed 's/^"\(.*\)"$$/\1/' | \
+ ( cd enterprise/core/src && $(CPPCHECK) -DHAVE_CONFIG_H -DCMC --enable=all
--suppress=missingIncludeSystem --inline-suppr -I . -I ../../.. -I livestatus -I
checkhelper --file-list=- --quiet --template=gcc --xml --xml-version=2 2>
cppcheck-result.xml )
+endif
# 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
diff --git a/livestatus/.gitignore b/livestatus/.gitignore
index 0acdced..349f3b8 100644
--- a/livestatus/.gitignore
+++ b/livestatus/.gitignore
@@ -1,3 +1,4 @@
+cppcheck-result.xml
.cproject
cscope.files
Debug