diff mbox series

[U-Boot,07/45] Makefile: Add a warning if SPL/TPL cannot be built

Message ID 20181001182249.129565-8-sjg@chromium.org
State Accepted
Commit 2c5eac1e1820163d3776e1f842550bfc4a88d136
Delegated to: Simon Glass
Headers show
Series Various fixes and improvements | expand

Commit Message

Simon Glass Oct. 1, 2018, 6:22 p.m. UTC
At present the build fails in strange ways if CONFIG_SPL is defined by
CONFIG_SUPPORT_SPL is not. Add a warning for this case as it can be very
confusing to debug.

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

 scripts/Makefile.spl | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Simon Glass Oct. 9, 2018, 11:55 p.m. UTC | #1
At present the build fails in strange ways if CONFIG_SPL is defined by
CONFIG_SUPPORT_SPL is not. Add a warning for this case as it can be very
confusing to debug.

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

 scripts/Makefile.spl | 7 +++++++
 1 file changed, 7 insertions(+)

Applied to u-boot-dm
diff mbox series

Patch

diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index e494d185e4b..c71497ff008 100644
--- a/scripts/Makefile.spl
+++ b/scripts/Makefile.spl
@@ -45,6 +45,13 @@  SPL_ :=
 SPL_TPL_ :=
 endif
 
+ifeq ($(obj)$(CONFIG_SUPPORT_SPL),spl)
+$(error You cannot build SPL without enabling CONFIG_SUPPORT_SPL)
+endif
+ifeq ($(obj)$(CONFIG_SUPPORT_TPL),tpl)
+$(error You cannot build TPL without enabling CONFIG_SUPPORT_TPL)
+endif
+
 include $(srctree)/config.mk
 include $(srctree)/arch/$(ARCH)/Makefile