Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Commit

Permalink
Use PKG_NAME in mk so it can be reused in drivers
Browse files Browse the repository at this point in the history
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
  • Loading branch information
SvenDowideit committed May 5, 2017
1 parent 577016a commit 705c368
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions mk/build.mk
Expand Up @@ -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
Expand All @@ -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))
2 changes: 1 addition & 1 deletion mk/main.mk
Expand Up @@ -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
Expand Down

0 comments on commit 705c368

Please sign in to comment.