mirror of
https://github.com/clearlinux/abireport.git
synced 2026-08-22 14:48:29 +00:00
8b1ffbf971
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
29 lines
651 B
Makefile
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)
|