[PATCH v7 1/3] fixup: Move python control earlier in Makefile

Simon Glass sjg at chromium.org
Thu Sep 21 15:37:43 CEST 2023


Move this control into the common area of the main Makefile, so it
applies to non-build rules as well. This allows 'make mrproper' to handle
python files as it should.

This should be squashed into:

   65a33eba10d Allow Python packages to be dropped

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

Changes in v7:
- Add new fixup patch to move python control earlier in Makefile

 Makefile | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index 264f31bfe473..efbaf434df48 100644
--- a/Makefile
+++ b/Makefile
@@ -485,6 +485,15 @@ export RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o    \
 export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \
 			 --exclude CVS --exclude .pc --exclude .hg --exclude .git
 
+export PYTHON_ENABLE
+
+# This is y if U-Boot should not build any Python tools or libraries. Typically
+# you would need to set this if those tools/libraries (typically binman and
+# pylibfdt) cannot be built by your environment and are provided separately.
+ifeq ($(NO_PYTHON),)
+PYTHON_ENABLE=y
+endif
+
 # ===========================================================================
 # Rules shared between *config targets and build targets
 
@@ -646,20 +655,12 @@ export CFLAGS_NON_EFI	# Compiler flags to remove when building EFI app
 export EFI_TARGET	# binutils target if EFI is natively supported
 
 export LTO_ENABLE
-export PYTHON_ENABLE
 
 # This is y if LTO is enabled for this build. See NO_LTO=1 to disable LTO
 ifeq ($(NO_LTO),)
 LTO_ENABLE=$(if $(CONFIG_LTO),y)
 endif
 
-# This is y if U-Boot should not build any Python tools or libraries. Typically
-# you would need to set this if those tools/libraries (typically binman and
-# pylibfdt) cannot be built by your environment and are provided separately.
-ifeq ($(NO_PYTHON),)
-PYTHON_ENABLE=y
-endif
-
 # If board code explicitly specified LDSCRIPT or CONFIG_SYS_LDSCRIPT, use
 # that (or fail if absent).  Otherwise, search for a linker script in a
 # standard location.
-- 
2.42.0.515.g380fc7ccd1-goog



More information about the U-Boot mailing list