Skip to content

Commit

Permalink
Isolate SRC_DIRS for generate-go-conversions target
Browse files Browse the repository at this point in the history
Isolate the items that go into SRC_DIRS so it's easier for a tool to update
this list.

Signed-off-by: Dean Roehrich <[email protected]>
  • Loading branch information
roehrich-hpe committed Aug 5, 2024
1 parent 90188ed commit 3109924
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -305,15 +305,16 @@ $(CONVERSION_GEN): $(LOCALBIN) # Build conversion-gen from tools folder.
GOBIN=$(LOCALBIN) $(GO_INSTALL) $(CONVERSION_GEN_PKG) $(CONVERSION_GEN_BIN) $(CONVERSION_GEN_VER)

.PHONY: generate-go-conversions
# The SRC_DIRS value is a comma-separated list of paths to old versions.
# The SRC_DIRS value is a space-separated list of paths to old versions.
# The --input-dirs value is a single path item; specify multiple --input-dirs
# parameters if you have multiple old versions.
SRC_DIRS=./api/v1alpha1
generate-go-conversions: $(CONVERSION_GEN) ## Generate conversions go code
$(MAKE) clean-generated-conversions SRC_DIRS="./api/v1alpha1"
$(MAKE) clean-generated-conversions SRC_DIRS="$(SRC_DIRS)"
$(CONVERSION_GEN) \
--output-file=zz_generated.conversion.go \
--go-header-file=./hack/boilerplate.go.txt \
./api/v1alpha1
$(SRC_DIRS)

.PHONY: clean-generated-conversions
clean-generated-conversions: ## Remove files generated by conversion-gen from the mentioned dirs
Expand Down

0 comments on commit 3109924

Please sign in to comment.