mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Simplify the repeat lines in build/root/Makefile
This commit is contained in:
parent
d21753e417
commit
fa774535eb
@ -527,12 +527,13 @@ define CMD_HELP_INFO
|
|||||||
endef
|
endef
|
||||||
#TODO: make EXCLUDE_TARGET auto-generated when there are other files in cmd/
|
#TODO: make EXCLUDE_TARGET auto-generated when there are other files in cmd/
|
||||||
EXCLUDE_TARGET=BUILD OWNERS
|
EXCLUDE_TARGET=BUILD OWNERS
|
||||||
.PHONY: $(filter-out %$(EXCLUDE_TARGET),$(notdir $(abspath $(wildcard cmd/*/))))
|
CMD_TARGET = $(filter-out %$(EXCLUDE_TARGET),$(notdir $(abspath $(wildcard cmd/*/))))
|
||||||
|
.PHONY: $(CMD_TARGET)
|
||||||
ifeq ($(PRINT_HELP),y)
|
ifeq ($(PRINT_HELP),y)
|
||||||
$(filter-out %$(EXCLUDE_TARGET),$(notdir $(abspath $(wildcard cmd/*/)))):
|
$(CMD_TARGET):
|
||||||
@echo "$$CMD_HELP_INFO"
|
@echo "$$CMD_HELP_INFO"
|
||||||
else
|
else
|
||||||
$(filter-out %$(EXCLUDE_TARGET),$(notdir $(abspath $(wildcard cmd/*/)))): generated_files
|
$(CMD_TARGET): generated_files
|
||||||
hack/make-rules/build.sh cmd/$@
|
hack/make-rules/build.sh cmd/$@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user