-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: tkrop <[email protected]>
- Loading branch information
Showing
4 changed files
with
19 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,11 +7,23 @@ else | |
$(warning warning: please customize variables in Makefile.vars) | ||
endif | ||
|
||
GOBIN ?= $(shell go env GOPATH)/bin | ||
GOMAKE ?= github.com/tkrop/[email protected] | ||
TARGETS := $(shell command -v $(GOBIN)/go-make >/dev/null || \ | ||
go install $(GOMAKE) >/dev/stderr && $(GOBIN)/go-make targets) | ||
# Setup desired go compiler environemt or defaults. | ||
export GO ?= go | ||
ifndef GOSETUP | ||
export GOBIN ?= $(shell $(GO) env GOPATH)/bin | ||
else ifeq ($(GOSETUP),local) | ||
export GOBIN := $(DIR_BUILD)/bin | ||
export PATH := $(GOBIN):$(PATH) | ||
else | ||
$(error error: unsupported go setup ($(GOSETUP))) | ||
endif | ||
|
||
# Setup go-make to utilize desired build and config scripts. | ||
GOMAKE_DEP ?= github.com/tkrop/[email protected] | ||
# Request targets from go-make targets target. | ||
TARGETS := $(shell command -v $(GOBIN)/go-make >/dev/null || \ | ||
go install $(GOMAKE_DEP) >/dev/stderr && \ | ||
$(GOBIN)/go-make targets 2>/dev/null) | ||
# Declare all targets phony to make them available for auto-completion. | ||
.PHONY:: $(TARGETS) | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters