Skip to content
This repository was archived by the owner on Jul 30, 2021. It is now read-only.

Commit 1bb203f

Browse files
wkingrphillips
authored andcommitted
Makefile: Actually use 'go install ...' for the install target (#956)
This was my intention with dbf0b6a (Makefile: Use 'go install ...' for the install target, 2018-04-03, #949), but I seem to have missed the actual code :/. Instead, that commit landed an earlier implementation which we intended to drop based on #949 review [1]. This commit has the intended implementation. For detailed motivation, see the description in dbf0b6a. [1]: #949 (comment)
1 parent dbf0b6a commit 1bb203f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ export PATH:=$(PATH):$(PWD)
55
SHELL:=$(shell which bash)
66
LOCAL_OS:=$(shell uname | tr A-Z a-z)
77
GOFILES:=$(shell find . -name '*.go' | grep -v -E '(./vendor)')
8-
GOPATH ?= $(shell go env GOPATH)
9-
PRIMARY_GOPATH ?= $(shell echo ${GOPATH} | cut -d : -f 1)
10-
GOBIN ?= $(PRIMARY_GOPATH)/bin
118
LDFLAGS=-X github.com/kubernetes-incubator/bootkube/pkg/version.Version=$(shell $(CURDIR)/build/git-version.sh)
129
TERRAFORM:=$(shell command -v terraform 2> /dev/null)
1310

@@ -42,8 +39,8 @@ endif
4239
@./scripts/verify-gopkg.sh
4340
@go test -v $(shell go list ./... | grep -v '/vendor/\|/e2e')
4441

45-
install: _output/bin/$(LOCAL_OS)/bootkube
46-
cp $< $(GOBIN)
42+
install:
43+
go install -ldflags "$(LDFLAGS)" ./cmd/bootkube
4744

4845
_output/bin/%: GOOS=$(word 1, $(subst /, ,$*))
4946
_output/bin/%: GOARCH=$(word 2, $(subst /, ,$*))

0 commit comments

Comments
 (0)