@@ -13,9 +13,6 @@ VERSION = $(shell git describe --dirty --tags --always)
13
13
GIT_COMMIT = $(shell git rev-parse HEAD)
14
14
K8S_VERSION = v1.18.2
15
15
REPO = 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
19
16
PKGS = $(shell go list ./... | grep -v /vendor/)
20
17
TEST_PKGS = $(shell go list ./... | grep -v -E 'github.com/operator-framework/operator-sdk/test/')
21
18
SOURCES = $(shell find . -name '* .go' -not -path "* /vendor/* ")
@@ -69,14 +66,8 @@ help: ## Show this help screen
69
66
70
67
all : format test build/operator-sdk # # Test and Build the Operator SDK
71
68
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
80
71
81
72
# Code management.
82
73
.PHONY : format tidy clean cli-doc lint
@@ -170,14 +161,11 @@ build/helm-operator-%-ppc64le-linux-gnu: GOARGS = GOOS=linux GOARCH=ppc64le
170
161
build/helm-operator-% -s390x-linux-gnu : GOARGS = GOOS=linux GOARCH=s390x
171
162
build/helm-operator-% -linux-gnu : GOARGS = GOOS=linux
172
163
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
+ }
181
169
182
170
build/% .asc : # # Create release signatures for operator-sdk release binaries
183
171
$(Q ) { \
0 commit comments