[PATCH 24/32] Makefile: Use empty SPL_ and SPL_TPL_ vars

Simon Glass sjg at chromium.org
Tue Jan 31 16:26:54 CET 2023


Now that we include an auto.conf file specific to the phase being built
we can make these variables empty.

With this done, we can also remove them from U-Boot entirely, dropping
them from all Makefiles. That is left for a future clean-up since we
cannot apply this series until CONFIG migration is complete.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 scripts/Kbuild.include | 15 ++-------------
 scripts/Makefile.spl   | 19 +++----------------
 2 files changed, 5 insertions(+), 29 deletions(-)

diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index 62e0207f91b..b7668694101 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -320,18 +320,7 @@ endif
 # do not delete intermediate files automatically
 .SECONDARY:
 
-ifdef CONFIG_SPL_BUILD
-SPL_ := SPL_
-ifeq ($(CONFIG_VPL_BUILD),y)
-SPL_TPL_ := VPL_
-else
-ifeq ($(CONFIG_TPL_BUILD),y)
-SPL_TPL_ := TPL_
-else
-SPL_TPL_ := SPL_
-endif
-endif
-else
+# The SPL_ and SPL_TPL_ vars resolve to nothing so they can be used in
+# Makefiles
 SPL_ :=
 SPL_TPL_ :=
-endif
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index 41528f32307..3009a8b0d4b 100644
--- a/scripts/Makefile.spl
+++ b/scripts/Makefile.spl
@@ -35,11 +35,9 @@ UBOOTINCLUDE := -I$(obj)/include $(UBOOTINCLUDE)
 KBUILD_CPPFLAGS += -DCONFIG_SPL_BUILD
 ifeq ($(CONFIG_TPL_BUILD),y)
 KBUILD_CPPFLAGS += -DCONFIG_TPL_BUILD
-else
-ifeq ($(CONFIG_VPL_BUILD),y)
+else ifeq ($(CONFIG_VPL_BUILD),y)
 KBUILD_CPPFLAGS += -DCONFIG_VPL_BUILD
 endif
-endif
 
 ifeq ($(CONFIG_VPL_BUILD),y)
 SPL_BIN := u-boot-vpl
@@ -56,21 +54,10 @@ endif
 
 export SPL_NAME
 
-ifdef CONFIG_SPL_BUILD
-SPL_ := SPL_
-ifeq ($(CONFIG_VPL_BUILD),y)
-SPL_TPL_ := VPL_
-else
-ifeq ($(CONFIG_TPL_BUILD),y)
-SPL_TPL_ := TPL_
-else
-SPL_TPL_ := SPL_
-endif
-endif
-else
+# The SPL_ and SPL_TPL_ vars resolve to nothing so they can be used in
+# Makefiles
 SPL_ :=
 SPL_TPL_ :=
-endif
 
 ifeq ($(obj)$(CONFIG_SUPPORT_SPL),spl)
 $(error You cannot build SPL without enabling CONFIG_SUPPORT_SPL)
-- 
2.39.1.456.gfc5497dd1b-goog



More information about the U-Boot mailing list