From 84c585cf6114fba0a8aeb1b07fd431ef1f4e653e Mon Sep 17 00:00:00 2001 From: Sunny Date: Thu, 14 Oct 2021 23:29:46 +0530 Subject: [PATCH] Makefile: set install target as phony `install/` directory results in make install target always up to date. Mark `install` as phony to be able to run it. Replace `cmd/flux` with `./cmd/flux` for install to work and add `CGO_ENABLED=0` like in other build and install targets. Signed-off-by: Sunny --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 563a672b..bdac575f 100644 --- a/Makefile +++ b/Makefile @@ -51,8 +51,9 @@ $(EMBEDDED_MANIFESTS_TARGET): $(call rwildcard,manifests/,*.yaml *.json) build: $(EMBEDDED_MANIFESTS_TARGET) CGO_ENABLED=0 go build -ldflags="-s -w -X main.VERSION=$(VERSION)" -o ./bin/flux ./cmd/flux +.PHONY: install install: - go install cmd/flux + CGO_ENABLED=0 go install ./cmd/flux install-dev: CGO_ENABLED=0 go build -o /usr/local/bin ./cmd/flux