Files
abireport/Makefile.gobuild
T
Ikey Doherty 8b1ffbf971 Initial commit
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2016-12-14 18:24:16 +00:00

29 lines
651 B
Makefile

CUR_DIR = $(shell pwd)
# "Normal" static binary
%.statbin:
GOPATH=$(CUR_DIR) go install -v $(subst .statbin,,$@)
clean:
test ! -d $(CUR_DIR)/pkg || rm -rvf $(CUR_DIR)/pkg; \
test ! -d $(CUR_DIR)/bin || rm -rvf $(CUR_DIR)/bin
spellcheck:
@ ( \
misspell -error `find $(CUR_DIR) -not -path '*/vendor/*' -name '*.go'`; \
);
%.compliant: spellcheck
@ ( \
pushd "$(PROJECT_ROOT)/$(subst .compliant,,$@)" >/dev/null || exit 1; \
go fmt || exit 1; \
gofmt -s -w *.go || exit 1; \
GOPATH=$(CUR_DIR)/ golint || exit 1; \
GOPATH=$(CUR_DIR)/ go vet || exit 1; \
);
%.test:
GOPATH=$(CUR_DIR) go test $(subst .test,,$@)
check: $(GO_TESTS)