summaryrefslogtreecommitdiff
path: root/Misc
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2013-08-12 23:13:54 +0200
committerTobias Klauser <tklauser@distanz.ch>2013-08-12 23:18:45 +0200
commitfcab1ec1a1a71265d86ae0b615a091c674041654 (patch)
treebfc5aa5bc9908bf479afcfe39db1794c28fb4ace /Misc
parentbce6f96faa3fbb50538712436ea2f4771d6491f9 (diff)
build: Add Makefile target for Coverity scanner
Add a Makefile target to build and upload a snapshot of netsniff-ng to the Coverity scanner. The variables COV_EMAIL and COV_PASSWD need to be set accordingly: make coverity COV_EMAIL=tklauser@distanz.ch COV_PASSWD=... Currently the sub-make which is part of the cov-built call issues warnings about undefined variables from the template. This can be ignored, the build works just fine. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'Misc')
-rw-r--r--Misc18
1 files changed, 18 insertions, 0 deletions
diff --git a/Misc b/Misc
index ff6e0f0..ea56d1a 100644
--- a/Misc
+++ b/Misc
@@ -49,6 +49,24 @@ cscope:
$(Q)$(call RM,cscope*)
$(FIND_SOURCE_FILES) | xargs cscope -b
+# these need to be specified on the command line
+COV_EMAIL =
+COV_PASSWD =
+
+coverity:
+ $(Q)test -n "$(COV_EMAIL)" || (echo "COV_EMAIL not set" && false)
+ $(Q)test -n "$(COV_PASSWD)" || (echo "COV_PASSWD not set" && false)
+ $(Q)$(MAKE) distclean
+ $(Q)$(call RM,cov-int)
+ $(Q)$(call MKDIR,cov-int)
+ $(Q)./configure
+ $(Q)cov-build --dir cov-int $(MAKE) CCACHE=
+ $(Q)tar czvf netsniff-ng-coverity.tgz cov-int
+ $(Q)echo "Uploading snapshot to Coverity scanner"
+ $(Q)curl --form file=@netsniff-ng-coverity.tgz --form project=netsniff-ng \
+ --form password=$(COV_PASSWD) --form email=$(COV_EMAIL) \
+ --form version=`$(GIT_VERSION)` http://scan5.coverity.com/cgi-bin/upload.py
+
help:
$(Q)echo "$(bold)Available tools from the toolkit:$(normal)"
$(Q)echo " <tool>:={$(TOOLS)}"