Skip to content

Commit 705c368

Browse files
committed
Use PKG_NAME in mk so it can be reused in drivers
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
1 parent 577016a commit 705c368

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

mk/build.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ define gocross
1616
$(if $(findstring [$(1)/$(2)],$(VALID_OS_ARCH)), \
1717
GOOS=$(1) GOARCH=$(2) CGO_ENABLED=0 \
1818
$(GO) build \
19-
-o $(PREFIX)/bin/docker-machine-${os.$(1)}-${arch.$(2)}$(call extension,$(GOOS)) \
19+
-o $(PREFIX)/bin/$(PKG_NAME)-${os.$(1)}-${arch.$(2)}$(call extension,$(GOOS)) \
2020
-a $(VERBOSE_GO) -tags "static_build netgo $(BUILDTAGS)" -installsuffix netgo \
2121
-ldflags "$(GO_LDFLAGS) -extldflags -static" $(GO_GCFLAGS) ./cmd/machine.go;)
2222
endef
@@ -27,10 +27,10 @@ build-clean:
2727
build-x: $(shell find . -type f -name '*.go')
2828
$(foreach GOARCH,$(TARGET_ARCH),$(foreach GOOS,$(TARGET_OS),$(call gocross,$(GOOS),$(GOARCH))))
2929

30-
$(PREFIX)/bin/docker-machine$(call extension,$(GOOS)): $(shell find . -type f -name '*.go')
30+
$(PREFIX)/bin/$(PKG_NAME)$(call extension,$(GOOS)): $(shell find . -type f -name '*.go')
3131
$(GO) build \
3232
-o $@ \
3333
$(VERBOSE_GO) -tags "$(BUILDTAGS)" \
3434
-ldflags "$(GO_LDFLAGS)" $(GO_GCFLAGS) ./cmd/machine.go
3535

36-
build: $(PREFIX)/bin/docker-machine$(call extension,$(GOOS))
36+
build: $(PREFIX)/bin/$(PKG_NAME)$(call extension,$(GOOS))

mk/main.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ include mk/validate.mk
4949
default: build
5050

5151
install:
52-
cp $(PREFIX)/bin/docker-machine /usr/local/bin
52+
cp $(PREFIX)/bin/$(PKG_NAME) /usr/local/bin
5353

5454
clean: coverage-clean build-clean
5555
test: dco fmt test-short lint vet

0 commit comments

Comments
 (0)