mirror of
https://github.com/kubernetes-sigs/kind.git
synced 2025-11-30 23:16:04 +07:00
add make install support
This commit is contained in:
8
Makefile
8
Makefile
@@ -20,6 +20,7 @@ REPO_ROOT=$(PWD)
|
||||
# autodetect host GOOS and GOARCH by default, even if go is not installed
|
||||
GOOS=$(shell hack/util/goos.sh)
|
||||
GOARCH=$(shell hack/util/goarch.sh)
|
||||
INSTALL_DIR=$(shell hack/util/goinstalldir.sh)
|
||||
# use the official module proxy by default
|
||||
GOPROXY=https://proxy.golang.org
|
||||
# default build image
|
||||
@@ -31,6 +32,7 @@ CACHE_VOLUME=kind-build-cache
|
||||
# variables for consistent logic, don't override these
|
||||
CONTAINER_REPO_DIR=/src/kind
|
||||
CONTAINER_OUT_DIR=$(CONTAINER_REPO_DIR)/_output/bin
|
||||
HOST_OUT_DIR=$(REPO_ROOT)/_output/bin
|
||||
|
||||
# standard "make" target -> builds
|
||||
all: build
|
||||
@@ -62,7 +64,11 @@ kind: make-cache
|
||||
# alias for building kind
|
||||
build: kind
|
||||
|
||||
# use: make install INSTALL_DIR=/usr/local/bin
|
||||
install: build
|
||||
cp $(HOST_OUT_DIR)/kind $(INSTALL_DIR)/kind
|
||||
|
||||
# standard cleanup target
|
||||
clean: clean-cache
|
||||
|
||||
.PHONY: make-cache clean-cache kind build all clean
|
||||
.PHONY: all make-cache clean-cache kind build install clean
|
||||
|
||||
Reference in New Issue
Block a user