]> git.ipfire.org Git - thirdparty/u-boot.git/commit
kbuild: unexport sub_make_done to fix child make invocations
authorSimon Glass <sjg@chromium.org>
Sat, 14 Feb 2026 02:47:34 +0000 (19:47 -0700)
committerTom Rini <trini@konsulko.com>
Tue, 3 Mar 2026 16:34:54 +0000 (10:34 -0600)
commit4284306d22c5b6d64ecd62b462551d9d313c8104
treee94d3d7c485efc5db23d2b9314af56b437ba4366
parent8353239dabb8079a10fd34167922302288a6a1bd
kbuild: unexport sub_make_done to fix child make invocations

The exported sub_make_done variable leaks into the environment of all
child processes. When make targets like tcheck spawn independent make
invocations with O=, those child makes inherit sub_make_done=1, skip
the KBUILD_OUTPUT setup and try to build in the source tree.

There is a workaround that resets sub_make_done to 0 for specific test
targets, but this isn't great since it has tolist every target that
spawns independent make invocations.

Instead, unexport sub_make_done once we are in the final make
invocation. The direct sub-make already has the value in its
environment from the export, and no further propagation is needed.
This also allows the per-target workaround to be removed.

Fixes: 27529f1cb02d ("kbuild: skip parsing pre sub-make code for recursion")
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Makefile