add go install to makefile for all binary
This commit is contained in:
parent
8353479476
commit
579ac0d2f3
11
Makefile
11
Makefile
@ -14,16 +14,25 @@ GOGET=$(GOCMD) get $(OPT_VERBOSE)
|
||||
SRCS := $(wildcard *.go)
|
||||
# This is a substitution reference. http://www.gnu.org/software/make/manual/make.html#Substitution-Refs
|
||||
BINS := $(SRCS:%.go=bin/%)
|
||||
INSTALLBINS := $(SRCS:%.go=$$GOPATH/bin/%)
|
||||
|
||||
all: $(BINS)
|
||||
install: $(INSTALLBINS)
|
||||
|
||||
$(BINS) : bin/% : %.go | bin
|
||||
$(BINS): bin/% : %.go | bin
|
||||
@echo "constructing : $@"
|
||||
@$(GOBUILD) -o "$@" "$^"
|
||||
|
||||
$(INSTALLBINS): $$GOPATH/bin/% : %.go
|
||||
@$(GOINSTALL) "$^"
|
||||
|
||||
bin:
|
||||
@mkdir bin
|
||||
|
||||
clean:
|
||||
$(GOCLEAN)
|
||||
rm -f ${GOPATH}/bin/$(PROGRAM_NAME)
|
||||
|
||||
get:
|
||||
$(GOGET) github.com/docker/docker-credential-helpers/client
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user