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>
This commit is contained in:
3
Makefile
3
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
|
||||
|
||||
Reference in New Issue
Block a user