Makefile: don't look for golint and godep in specific places

Using $GOPATH/bin/godep or $GOPATH/bin/golint is problematic because
$GOPATH can contain multiple colon-separated paths.

We should just run these like normal binaries. The user should make sure
their $PATH contains $GOPATH/bin, if necessary. This is part of normal
Go setup.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This commit is contained in:
Aaron Lehmann 2016-03-31 11:00:28 -07:00
parent 0eefe17730
commit 20525e390a

View file

@ -31,11 +31,8 @@ GO15VENDOREXPERIMENT := 1
PKGS := $(shell go list -tags "${DOCKER_BUILDTAGS}" ./... | grep -v ^github.com/docker/distribution/vendor/) PKGS := $(shell go list -tags "${DOCKER_BUILDTAGS}" ./... | grep -v ^github.com/docker/distribution/vendor/)
# Resolving binary dependencies for specific targets # Resolving binary dependencies for specific targets
GOLINT_BIN := $(GOPATH)/bin/golint GOLINT := $(shell which golint || echo '')
GOLINT := $(shell [ -x $(GOLINT_BIN) ] && echo $(GOLINT_BIN) || echo '') GODEP := $(shell which godep || echo '')
GODEP_BIN := $(GOPATH)/bin/godep
GODEP := $(shell [ -x $(GODEP_BIN) ] && echo $(GODEP_BIN) || echo '')
${PREFIX}/bin/registry: $(wildcard **/*.go) ${PREFIX}/bin/registry: $(wildcard **/*.go)
@echo "+ $@" @echo "+ $@"