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 <darkowlzz@protonmail.com>
pull/1948/head
Sunny 3 years ago
parent ca496d393d
commit 84c585cf61

@ -51,8 +51,9 @@ $(EMBEDDED_MANIFESTS_TARGET): $(call rwildcard,manifests/,*.yaml *.json)
build: $(EMBEDDED_MANIFESTS_TARGET) build: $(EMBEDDED_MANIFESTS_TARGET)
CGO_ENABLED=0 go build -ldflags="-s -w -X main.VERSION=$(VERSION)" -o ./bin/flux ./cmd/flux CGO_ENABLED=0 go build -ldflags="-s -w -X main.VERSION=$(VERSION)" -o ./bin/flux ./cmd/flux
.PHONY: install
install: install:
go install cmd/flux CGO_ENABLED=0 go install ./cmd/flux
install-dev: install-dev:
CGO_ENABLED=0 go build -o /usr/local/bin ./cmd/flux CGO_ENABLED=0 go build -o /usr/local/bin ./cmd/flux

Loading…
Cancel
Save