-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1a28114
commit 888b239
Showing
1 changed file
with
28 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
.PHONY: install | ||
|
||
TOPDIR = $(shell pwd) | ||
|
||
export GOWORKSPACE := $(shell pwd) | ||
export GOBIN := $(GOWORKSPACE)/bin | ||
export GO111MODULE := on | ||
|
||
GO_BINS = | ||
GO_BINS += runitcmd | ||
|
||
all: | ||
$(MAKE) compile | ||
|
||
compile: | ||
mkdir -p tmp | ||
mkdir -p $(GOBIN) | ||
go install github.com/... | ||
|
||
install: | ||
mkdir -p $(DESTDIR)/$(INSTALL_PREFIX)/bin/ | ||
$(MAKE) install-bins | ||
|
||
install-bins: $(addprefix installbin-, $(GO_BINS)) | ||
|
||
$(addprefix installbin-, $(GO_BINS)): | ||
$(eval BIN=$(@:installbin-%=%)) | ||
cp -v $(GOBIN)/$(BIN) $(DESTDIR)/$(INSTALL_PREFIX)/bin/ |