@@ -20,7 +20,8 @@ install-build-deps: ## Install dependencies (packages and tools)
20
20
21
21
# #@ Build
22
22
23
- godeps = $(shell go list -deps -f '{{if not .Standard}}{{ $$dep := . }}{{range .GoFiles}}{{$$dep.Dir}}/{{.}} {{end}}{{end}}' $(1 ) )
23
+ godeps_cmd = go list -deps -f '{{if not .Standard}}{{ $$dep := . }}{{range .GoFiles}}{{$$dep.Dir}}/{{.}} {{end}}{{end}}' $(1 ) | sed "s%${PWD}/%%g"
24
+ godeps = $(shell $(call godeps_cmd,$(1 ) ) )
24
25
25
26
eksctl : $(call godeps,./cmd/...) # # Build main binary
26
27
CGO_ENABLED=0 time go build -v -ldflags " -X $( version_pkg) .gitCommit=$( git_commit) -X $( version_pkg) .builtAt=$( built_at) " ./cmd/eksctl
@@ -112,9 +113,10 @@ delete-integration-test-dev-cluster: build ## Delete the test cluster for use wh
112
113
113
114
AWS_SDK_MOCKS := $(wildcard pkg/eks/mocks/* API.go)
114
115
115
- GENERATED_FILES =pkg/addons/default/assets.go \
116
+ DEEP_COPY_HELPER := pkg/apis/eksctl.io/v1alpha5/zz_generated.deepcopy.go
117
+ GENERATED_FILES := pkg/addons/default/assets.go \
116
118
pkg/nodebootstrap/assets.go \
117
- pkg/apis/eksctl.io/v1alpha5/zz_generated.deepcopy.go \
119
+ $( DEEP_COPY_HELPER ) \
118
120
pkg/ami/static_resolver_ami.go \
119
121
site/content/usage/20-schema.md \
120
122
$(AWS_SDK_MOCKS )
@@ -138,11 +140,12 @@ pkg /nodebootstrap/assets.go: pkg/nodebootstrap/assets/*
138
140
@# generate-groups.sh can't find the lincense header when using Go modules, so we provide one
139
141
printf " /*\n%s\n*/\n" " $$ (cat LICENSE)" > $@
140
142
141
- pkg/apis/eksctl.io/v1alpha5/zz_generated.deepcopy.go : $(call godeps,./pkg/apis/...) .license-header # # Generate Kubernetes API helpers
143
+ DEEP_COPY_DEPS := $(shell $(call godeps_cmd,./pkg/apis/...) | sed 's% $(DEEP_COPY_HELPER ) %% ' )
144
+ $(DEEP_COPY_HELPER ) : $(DEEP_COPY_DEPS ) .license-header # # Generate Kubernetes API helpers
142
145
time go mod download k8s.io/code-generator # make sure the code-generator is present
143
146
time env GOPATH=
" $$ (go env GOPATH)" bash
" $$ (go env GOPATH)/pkg/mod/k8s.io/[email protected] /generate-groups.sh" \
144
147
deepcopy,defaulter _ ./pkg/apis eksctl.io:v1alpha5 --go-header-file .license-header --output-base=" $$ {PWD}" \
145
- || (cat codegenheader.txt ; cat pkg/apis/eksctl.io/v1alpha5/zz_generated.deepcopy.go ; exit 1)
148
+ || (cat codegenheader.txt ; cat $( DEEP_COPY_HELPER ) ; exit 1)
146
149
147
150
# static_resolver_ami.go doesn't only depend on files (it should be refreshed whenever a release is made in AWS)
148
151
# so we need to forcicly generate it
0 commit comments