[apparmor] [PATCH 2/3] Makefile: Add coverity target
Tyler Hicks
tyhicks at canonical.com
Tue Jan 5 23:11:14 UTC 2016
Add a target that uses cov-build, which must be found in $PATH, to
generate an intermediate Coverity directory. Finally, the intermediate
directory is converted to a compressed tarball, stored in coverity/apparmor-cov-int.tar.gz, that is suitable for uploading to scan.coverity.com.
Signed-off-by: Tyler Hicks <tyhicks at canonical.com>
---
Makefile | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 5a9ba73..d7c3849 100644
--- a/Makefile
+++ b/Makefile
@@ -24,6 +24,7 @@ REPO_URL?=https://code.launchpad.net/~apparmor-dev/apparmor/master
#REPO_URL=.
#REPO_URL="bzr+ssh://bazaar.launchpad.net/~sbeattie/+junk/apparmor-dev/"
+COVERITY_DIR=coverity
RELEASE_DIR=apparmor-${VERSION}
__SETUP_DIR?=.
@@ -60,7 +61,7 @@ export_dir:
.PHONY: clean
clean:
- -rm -rf ${RELEASE_DIR} ./apparmor-${VERSION}~*
+ -rm -rf ${RELEASE_DIR} ./apparmor-${VERSION}~* ${COVERITY_DIR}
for dir in $(DIRS); do \
make -C $$dir clean; \
done
@@ -69,6 +70,14 @@ clean:
setup:
cd $(__SETUP_DIR)/libraries/libapparmor && ./autogen.sh
+.PHONY: coverity
+coverity: COV_INT=$(COVERITY_DIR)/apparmor-cov-int
+coverity: setup
+ cd $(__SETUP_DIR)/libraries/libapparmor && ./configure --with-python
+ make clean
+ $(foreach dir, $(DIRS), cov-build --dir $(COV_INT) -- make -C $(dir);)
+ tar -cvzf $(COV_INT).tar.gz $(COV_INT)
+
.PHONY: tag
tag:
bzr tag apparmor_${TAG_VERSION}
--
2.5.0
More information about the AppArmor
mailing list