Module: check_mk
Branch: master
Commit: 11417c11f297fa669c611f20c502aec25641e48d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=11417c11f297fa…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Wed Feb 3 11:11:23 2016 +0100
Added a Makefile target to generate a clang compilation database.
---
.gitignore | 1 +
Makefile | 9 +++++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index d169491..1fc2593 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,7 @@ api
check_mk-*.spec
check_mk-*.tar.gz
clang-analyzer/
+compile_commands.json
mk-livestatus-*.tar.gz
mkeventd-*.tar.gz
check-mk-*.exe
diff --git a/Makefile b/Makefile
index 1ba1f5f..aa2e4bc 100644
--- a/Makefile
+++ b/Makefile
@@ -39,6 +39,7 @@ SCAN_BUILD := scan-build-$(CLANG_VERSION)
CPPCHECK := cppcheck
DOXYGEN := doxygen
IWYU := include-what-you-use
+BEAR := bear-fixed
# File to pack into livestatus-$(VERSION).tar.gz
LIVESTATUS_SOURCES := configure aclocal.m4 config.guess config.h.in config.sub \
@@ -245,7 +246,7 @@ minify-js:
fi
clean:
- rm -rf api clang-analyzer dist.tmp rpm.topdir *.rpm *.deb *.exe \
+ rm -rf api clang-analyzer compile_commands.json dist.tmp rpm.topdir *.rpm *.deb *.exe \
mkeventd-*.tar.gz mk-livestatus-*.tar.gz \
$(NAME)-*.tar.gz *~ counters autochecks \
precompiled cache web/htdocs/js/*_min.js
@@ -255,7 +256,11 @@ mrproper:
git clean -xfd -e .bugs 2>/dev/null || git clean -xfd
setup:
- sudo apt-get install figlet pngcrush slimit
+ sudo apt-get install figlet pngcrush slimit bear
+
+compile_commands.json: $(FILES_TO_FORMAT)
+ $(MAKE) -C livestatus clean
+ $(BEAR) $(MAKE) -C livestatus -j8
# Not really perfect rules, but better than nothing
iwyu: