Add a target that uses cov-build, which must be found in $PATH, to generate an intermediate Coverity directory. The intermediate Coverity directory will be based on a clean snapshot of the last commit in the bzr tree. Finally, the intermediate directory is converted to a compressed tarball, stored in coverity/apparmor-<SNAPSHOT_VERSION>-cov-int.tar.gz, that is suitable for uploading to scan.coverity.com.
Signed-off-by: Tyler Hicks <tyhi...@canonical.com> --- Makefile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index b3f5130..6f0be36 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?=. @@ -44,13 +45,19 @@ tarball: clean tar ${TAR_EXCLUSIONS} -cvzf ${RELEASE_DIR}.tar.gz ${RELEASE_DIR} .PHONY: snapshot -snapshot: REPO_VERSION:=$(shell $(value REPO_VERSION_CMD)) -snapshot: SNAPSHOT_NAME=apparmor-$(VERSION)~$(REPO_VERSION) +snapshot coverity: REPO_VERSION:=$(shell $(value REPO_VERSION_CMD)) +snapshot coverity: SNAPSHOT_NAME=apparmor-$(VERSION)~$(REPO_VERSION) snapshot: clean make export_dir __EXPORT_DIR=${SNAPSHOT_NAME} __REPO_VERSION=${REPO_VERSION} ; \ make setup __SETUP_DIR=${SNAPSHOT_NAME} ; \ tar ${TAR_EXCLUSIONS} -cvzf ${SNAPSHOT_NAME}.tar.gz ${SNAPSHOT_NAME} ; +.PHONY: coverity +coverity: COV_INT=$(COVERITY_DIR)/$(SNAPSHOT_NAME)-cov-int +coverity: snapshot + cd $(SNAPSHOT_NAME)/libraries/libapparmor && ./configure --with-python + $(foreach dir, $(DIRS), cov-build --dir $(COV_INT) -- make -C $(SNAPSHOT_NAME)/$(dir);) + tar -cvzf $(COV_INT).tar.gz $(COV_INT) .PHONY: export_dir export_dir: @@ -60,7 +67,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 -- 2.5.0 -- AppArmor mailing list AppArmor@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor