[PATCH 03/15] kbuild: move 'PHONY += modules_prepare' to the common part

From: Masahiro Yamada
Date: Sat Aug 27 2022 - 22:40:58 EST


Unify the code between in-tree builds and external module builds.

Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx>
---

Makefile | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index badd318c5524..54e481162608 100644
--- a/Makefile
+++ b/Makefile
@@ -1446,7 +1446,6 @@ modules.order: $(subdir-modorder) FORCE
targets += modules.order

# Target to prepare building external modules
-PHONY += modules_prepare
modules_prepare: prepare
$(Q)$(MAKE) $(build)=scripts scripts/module.lds

@@ -1747,15 +1746,12 @@ help:
@echo ' clean - remove generated files in module directory only'
@echo ''

-# no-op for external module builds
-PHONY += modules_prepare
-
endif # KBUILD_EXTMOD

# ---------------------------------------------------------------------------
# Modules

-PHONY += modules modules_install
+PHONY += modules modules_install modules_prepare

ifdef CONFIG_MODULES

--
2.34.1