@@ -13,9 +13,6 @@ VERSION = $(shell git describe --dirty --tags --always)
1313GIT_COMMIT = $(shell git rev-parse HEAD)
1414K8S_VERSION = v1.18.2
1515REPO = github.com/operator-framework/operator-sdk
16- SDK_BUILD_PATH = $(REPO ) /cmd/operator-sdk
17- ANSIBLE_BUILD_PATH = $(REPO ) /cmd/ansible-operator
18- HELM_BUILD_PATH = $(REPO ) /cmd/helm-operator
1916PKGS = $(shell go list ./... | grep -v /vendor/)
2017TEST_PKGS = $(shell go list ./... | grep -v -E 'github.com/operator-framework/operator-sdk/test/')
2118SOURCES = $(shell find . -name '* .go' -not -path "* /vendor/* ")
@@ -69,14 +66,8 @@ help: ## Show this help screen
6966
7067all : format test build/operator-sdk # # Test and Build the Operator SDK
7168
72- install : # # Install the operator-sdk binary
73- $(Q )$(GOARGS ) go install $(GO_BUILD_ARGS ) $(SDK_BUILD_PATH )
74-
75- install-ansible : # # Install the ansible-operator binary
76- $(Q )$(GOARGS ) go install $(GO_BUILD_ARGS ) $(ANSIBLE_BUILD_PATH )
77-
78- install-helm : # # Install the helm-operator binary
79- $(Q )$(GOARGS ) go install $(GO_BUILD_ARGS ) $(HELM_BUILD_PATH )
69+ install : # # Install the binaries
70+ $(Q )$(GOARGS ) go install $(GO_BUILD_ARGS ) ./cmd/operator-sdk ./cmd/ansible-operator ./cmd/helm-operator
8071
8172# Code management.
8273.PHONY : format tidy clean cli-doc lint
@@ -170,14 +161,11 @@ build/helm-operator-%-ppc64le-linux-gnu: GOARGS = GOOS=linux GOARCH=ppc64le
170161build/helm-operator-% -s390x-linux-gnu : GOARGS = GOOS=linux GOARCH=s390x
171162build/helm-operator-% -linux-gnu : GOARGS = GOOS=linux
172163
173- build/operator-% : $(SOURCES ) # # Build the operator-sdk binary
174- $(Q )$(GOARGS ) go build $(GO_BUILD_ARGS ) -o $@ $(SDK_BUILD_PATH )
175-
176- build/ansible-% : $(SOURCES ) # # Build the ansible-operator binary
177- $(Q )$(GOARGS ) go build $(GO_BUILD_ARGS ) -o $@ $(ANSIBLE_BUILD_PATH )
178-
179- build/helm-% : $(SOURCES ) # # Build the helm-operator binary
180- $(Q )$(GOARGS ) go build $(GO_BUILD_ARGS ) -o $@ $(HELM_BUILD_PATH )
164+ build/% : $(SOURCES ) # # Build the operator-sdk binary
165+ $(Q ) { \
166+ cmdpkg=$$(echo $* | sed "s/\(operator-sdk\|ansible-operator\|helm-operator\ ) .* /\1 /" ); \
167+ $(GOARGS ) go build $(GO_BUILD_ARGS ) -o $@ ./cmd/$$ cmdpkg; \
168+ }
181169
182170build/% .asc : # # Create release signatures for operator-sdk release binaries
183171 $(Q ) { \
0 commit comments