Permalink
Browse files

Use PKG_NAME in mk so it can be reused in drivers

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
  • Loading branch information...
SvenDowideit committed May 5, 2017
1 parent 577016a commit 705c3683ec9ef3ba18613f0d0808affa405bece6
Showing with 4 additions and 4 deletions.
  1. +3 −3 mk/build.mk
  2. +1 −1 mk/main.mk
View
@@ -16,7 +16,7 @@ define gocross
$(if $(findstring [$(1)/$(2)],$(VALID_OS_ARCH)), \
GOOS=$(1) GOARCH=$(2) CGO_ENABLED=0 \
$(GO) build \
- -o $(PREFIX)/bin/docker-machine-${os.$(1)}-${arch.$(2)}$(call extension,$(GOOS)) \
+ -o $(PREFIX)/bin/$(PKG_NAME)-${os.$(1)}-${arch.$(2)}$(call extension,$(GOOS)) \
-a $(VERBOSE_GO) -tags "static_build netgo $(BUILDTAGS)" -installsuffix netgo \
-ldflags "$(GO_LDFLAGS) -extldflags -static" $(GO_GCFLAGS) ./cmd/machine.go;)
endef
@@ -27,10 +27,10 @@ build-clean:
build-x: $(shell find . -type f -name '*.go')
$(foreach GOARCH,$(TARGET_ARCH),$(foreach GOOS,$(TARGET_OS),$(call gocross,$(GOOS),$(GOARCH))))
-$(PREFIX)/bin/docker-machine$(call extension,$(GOOS)): $(shell find . -type f -name '*.go')
+$(PREFIX)/bin/$(PKG_NAME)$(call extension,$(GOOS)): $(shell find . -type f -name '*.go')
$(GO) build \
-o $@ \
$(VERBOSE_GO) -tags "$(BUILDTAGS)" \
-ldflags "$(GO_LDFLAGS)" $(GO_GCFLAGS) ./cmd/machine.go
-build: $(PREFIX)/bin/docker-machine$(call extension,$(GOOS))
+build: $(PREFIX)/bin/$(PKG_NAME)$(call extension,$(GOOS))
View
@@ -49,7 +49,7 @@ include mk/validate.mk
default: build
install:
- cp $(PREFIX)/bin/docker-machine /usr/local/bin
+ cp $(PREFIX)/bin/$(PKG_NAME) /usr/local/bin
clean: coverage-clean build-clean
test: dco fmt test-short lint vet

0 comments on commit 705c368

Please sign in to comment.