diff mbox series

[RFC,v2,47/56] Makefile: Use empty SPL_ and SPL_TPL_ vars

Message ID 20230204002619.938387-48-sjg@chromium.org
State RFC
Delegated to: Tom Rini
Headers show
Series Migrate to split config | expand

Commit Message

Simon Glass Feb. 4, 2023, 12:26 a.m. UTC
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@chromium.org>
---

(no changes since v1)

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

Patch

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)