From 2550c834826e26e181617177613132983a742ac3 Mon Sep 17 00:00:00 2001 From: Rasheed Abdul-Aziz Date: Wed, 29 Sep 2021 19:24:37 -0400 Subject: [PATCH] faster deepcopy object generation --- Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 4a568c6ef..97704901a 100644 --- a/Makefile +++ b/Makefile @@ -6,15 +6,14 @@ build: gen-objects gen-manifests run: build build/cartographer -.PHONY: gen-objects -gen-objects: +crd_non_sources := pkg/apis/v1alpha1/zz_generated.deepcopy.go $(wildcard pkg/apis/v1alpha1/*_test.go) +crd_sources := $(filter-out $(crd_non_sources),$(wildcard pkg/apis/v1alpha1/*.go)) + +pkg/apis/v1alpha1/zz_generated.deepcopy.go: $(crd_sources) go run sigs.k8s.io/controller-tools/cmd/controller-gen \ object \ paths=./pkg/apis/v1alpha1 -crd_non_sources := pkg/apis/v1alpha1/zz_generated.deepcopy.go $(wildcard pkg/apis/v1alpha1/*_test.go) -crd_sources := $(filter-out $(crd_non_sources),$(wildcard pkg/apis/v1alpha1/*.go)) - config/crd/bases/*.yaml &: $(crd_sources) go run sigs.k8s.io/controller-tools/cmd/controller-gen \ crd \ @@ -24,6 +23,9 @@ config/crd/bases/*.yaml &: $(crd_sources) -f ./hack/boilerplate.go.txt \ config/crd/bases +.PHONY: gen-objects +gen-objects: pkg/apis/v1alpha1/zz_generated.deepcopy.go + .PHONY: gen-manifests gen-manifests: config/crd/bases/*.yaml