open-nomad/vendor/github.com/shirou/gopsutil/Makefile
K.C. Wong 8efd355af7 Update vendor package shirou/gopsutil
* resolve #1392
* pull in the fix for shirou/gopsutil/#249 which updates
  the Linux driver for `cpu` to set `cpu.Mhz` to the maximum
  clock-speed of the CPU, if that's available
2016-08-30 10:48:07 -07:00

27 lines
1.2 KiB
Makefile

.PHONY: help check
.DEFAULT_GOAL := help
SUBPKGS=cpu disk docker host internal load mem net process
help: ## Show help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
check: ## Check
errcheck -ignore="Close|Run|Write" ./...
golint ./... | egrep -v 'underscores|HttpOnly|should have comment|comment on exported|CamelCase|VM|UID' && exit 1 || exit 0
BUILD_FAIL_PATTERN=grep -v "exec format error" | grep "build failed" && exit 1 || exit 0
build_test: ## test only buildable
# Supported operating systems
GOOS=linux go test ./... | $(BUILD_FAIL_PATTERN)
GOOS=freebsd go test ./... | $(BUILD_FAIL_PATTERN)
CGO_ENABLED=0 GOOS=darwin go test ./... | $(BUILD_FAIL_PATTERN)
CGO_ENABLED=1 GOOS=darwin go test ./... | $(BUILD_FAIL_PATTERN)
GOOS=windows go test ./... | $(BUILD_FAIL_PATTERN)
# Operating systems supported for building only (not implemented error if used)
GOOS=dragonfly go test ./... | $(BUILD_FAIL_PATTERN)
GOOS=netbsd go test ./... | $(BUILD_FAIL_PATTERN)
GOOS=openbsd go test ./... | $(BUILD_FAIL_PATTERN)
GOOS=solaris go test ./... | $(BUILD_FAIL_PATTERN)
@echo 'Successfully built on all known operating systems'