]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
Revert "kbuild: unexport sub_make_done to fix child make invocations"
authorTom Rini <trini@konsulko.com>
Wed, 4 Mar 2026 17:34:36 +0000 (11:34 -0600)
committerTom Rini <trini@konsulko.com>
Wed, 4 Mar 2026 17:34:36 +0000 (11:34 -0600)
This unfortunately introduces failure to build in other cases:
$ make ARCH=riscv CROSS_COMPILE=riscv64-unknown-linux-gnu- O=build \
microchip_mpfs_generic_defconfig
  GEN     Makefile
#
# configuration written to .config
#
$ make ARCH=riscv CROSS_COMPILE=riscv64-unknown-linux-gnu- O=build
  HOSTCC  scripts/basic/fixdep
  GEN     Makefile
  HOSTCC  scripts/kconfig/conf.o
  YACC    scripts/kconfig/zconf.tab.[ch]
  LEX     scripts/kconfig/zconf.lex.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf  --syncconfig Kconfig
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[4]: *** [/stuff/u-boot/scripts/kconfig/Makefile:75: syncconfig] Error 1
make[3]: *** [/stuff/u-boot/Makefile:702: syncconfig] Error 2
make[2]: *** [../Makefile:189: __sub-make] Error 2
make[1]: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'.  Stop.
make: *** [Makefile:189: __sub-make] Error 2

This reverts commit 4284306d22c5b6d64ecd62b462551d9d313c8104.

Reported-by: Conor Dooley <conor@kernel.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Makefile

index fdaba4895fed362cb9ad7cbe088c22feec1c33aa..5df869213b634b30968b19688d4a79f1a7e17f90 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -194,10 +194,6 @@ endif # sub_make_done
 # We process the rest of the Makefile if this is the final invocation of make
 ifeq ($(need-sub-make),)
 
-# Do not propagate sub_make_done to non-submake children (e.g. test scripts
-# that invoke make separately with O= need to process the KBUILD_OUTPUT block)
-unexport sub_make_done
-
 # Do not print "Entering directory ...",
 # but we want to display it when entering to the output directory
 # so that IDEs/editors are able to understand relative filenames.
@@ -2741,6 +2737,10 @@ help:
        @echo  'Execute "make" or "make all" to build all targets marked with [*] '
        @echo  'For further info see the ./README file'
 
+ifneq ($(filter tests pcheck qcheck tcheck,$(MAKECMDGOALS)),)
+export sub_make_done := 0
+endif
+
 tests check:
        $(srctree)/test/run