makefile: add rule to run implements tool
Right now the tool doesn't do much checking but it does check what is
implemented, so we call the rule 'check-implements'. All current
sub-packages are checked. Use IMPLEMENTS_OPTS to pass additional cli
options to the tool.
@@ -6,6 +6,7 @@ VOLUME_FLAGS :=
CEPH_VERSION := nautilus
RESULTS_DIR :=
CHECK_GOFMT_FLAGS := -e -s -l
+IMPLEMENTS_OPTS :=
SELINUX := $(shell getenforce 2>/dev/null)
ifeq ($(SELINUX),Enforcing)
@@ -74,6 +75,9 @@ test-bins: test-binaries
implements:
go build -o implements ./contrib/implements
+check-implements: implements
+ ./implements $(IMPLEMENTS_OPTS) ./cephfs ./rados ./rbd
+
# force_go_build is phony and builds nothing, can be used for forcing
# go toolchain commands to always run
-.PHONY: build fmt test test-docker check test-binaries test-bins force_go_build
+.PHONY: build fmt test test-docker check test-binaries test-bins force_go_build check-implements
