summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cmds3
-rw-r--r--Makefile3
-rw-r--r--Misc18
3 files changed, 24 insertions, 0 deletions
diff --git a/Cmds b/Cmds
index f2fc8cb..704ab7e 100644
--- a/Cmds
+++ b/Cmds
@@ -26,6 +26,8 @@ else
INSTX = echo -e " INST\t$(1)" && install -C $(1) $(2)/$(shell basename $(1))
endif
+MKDIR = echo -e " MKDIR\t$(1)" && mkdir -p $(1)
+
RM = echo -e " RM\t$(1)" && rm -rf $(1)
RMDIR = echo -e " RM\t$(1)" && rmdir --ignore-fail-on-non-empty $(1) 2> /dev/null || true
@@ -39,3 +41,4 @@ GIT_LOG = git shortlog -n $(shell git tag | tail -n2 | head -n1)..HEAD
GIT_REM = git ls-files -o | xargs rm -rf
GIT_PEOPLE = git log --no-merges $(shell git tag | tail -n2 | head -n1)..HEAD | grep Author: | cut -d: -f2 | \
cut -d\< -f1 | sort | uniq -c | sort -nr
+GIT_VERSION = git describe --always
diff --git a/Makefile b/Makefile
index 99358a2..07a6d76 100644
--- a/Makefile
+++ b/Makefile
@@ -109,6 +109,7 @@ VERSION_LONG = "$(VERSION_SHORT)$(CONFIG_RC) ($(NAME))"
export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION
export CROSS_COMPILE
+export DEBUG DISTRO HARDENING
bold = $(shell tput bold)
normal = $(shell tput sgr0)
@@ -141,6 +142,8 @@ distclean: clean
$(Q)$(call RM,Config)
$(Q)$(call RM,config.h)
$(Q)$(call RM,config.log)
+ $(Q)$(call RM,cov-int)
+ $(Q)$(call RM,netsniff-ng-coverity.tgz)
mrproper: distclean
$(Q)$(GIT_REM)
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)}"