Kbuild: Always use $(PHASE_)

It is confusing to have both "$(PHASE_)" and "$(XPL_)" be used in our
Makefiles as part of the macros to determine when to do something in our
Makefiles based on what phase of the build we are in. For consistency,
bring this down to a single macro and use "$(PHASE_)" only.

Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Tom Rini
2025-04-01 16:55:23 -06:00
parent 3703298e57
commit 302b41d539
89 changed files with 242 additions and 248 deletions

View File

@@ -324,18 +324,16 @@ endif
# do not delete intermediate files automatically
.SECONDARY:
ifdef CONFIG_XPL_BUILD
XPL_ := SPL_
ifeq ($(CONFIG_SPL_BUILD),y)
PHASE_ := SPL_
else
ifeq ($(CONFIG_VPL_BUILD),y)
PHASE_ := VPL_
else
ifeq ($(CONFIG_TPL_BUILD),y)
PHASE_ := TPL_
else
PHASE_ := SPL_
endif
endif
else
XPL_ :=
PHASE_ :=
endif
endif
endif

View File

@@ -58,21 +58,19 @@ endif
export SPL_NAME
ifdef CONFIG_XPL_BUILD
XPL_ := SPL_
ifeq ($(CONFIG_SPL_BUILD),y)
PHASE_ := SPL_
else
ifeq ($(CONFIG_VPL_BUILD),y)
PHASE_ := VPL_
else
ifeq ($(CONFIG_TPL_BUILD),y)
PHASE_ := TPL_
else
PHASE_ := SPL_
endif
endif
else
XPL_ :=
PHASE_ :=
endif
endif
endif
ifeq ($(obj)$(CONFIG_SUPPORT_SPL),spl)
$(error You cannot build SPL without enabling CONFIG_SUPPORT_SPL)