summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlias Apalodimas <ilias.apalodimas@linaro.org>2025-06-11 23:24:40 +0300
committerTom Rini <trini@konsulko.com>2025-06-11 16:21:36 -0600
commit070b81458aec02f0cde69f87b28fa82c5bb8e906 (patch)
tree8f212098f6ecc550183c69b0097013de97d7a2e2
parent45acf56e59a38275fcd4662eb005d910f65df4b5 (diff)
kbuild: fix single target build for external module
Backported from kernel commit e07db28eea38 ("kbuild: fix single target build for external module") It's worth noting that crmodverdir is empty for U-Boot. Just backport it to make diffing easier Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
-rw-r--r--Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index af8129ccc88..a9cba5b6e07 100644
--- a/Makefile
+++ b/Makefile
@@ -230,6 +230,9 @@ ifeq ($(KBUILD_EXTMOD),)
_all: all
else
_all: modules
+PHONY += prepare
+prepare:
+ $(cmd_crmodverdir)
endif
ifeq ($(KBUILD_SRC),)
@@ -2503,15 +2506,12 @@ endif
# Modules
/: prepare FORCE
- $(cmd_crmodverdir)
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
$(build)=$(build-dir)
%/: prepare FORCE
- $(cmd_crmodverdir)
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
$(build)=$(build-dir)
%.ko: prepare FORCE
- $(cmd_crmodverdir)
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
$(build)=$(build-dir) $(@:.ko=.o)
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost