diff mbox series

[2/2] kbuild: split modules.order build rule out of 'modules' target

Message ID 20190623161328.22461-2-yamada.masahiro@socionext.com (mailing list archive)
State New, archived
Headers show
Series [1/2] kbuild: fix missed rebuild of modules.builtin | expand

Commit Message

Masahiro Yamada June 23, 2019, 4:13 p.m. UTC
Merge the build rules of modules.order and modules.builtin

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 Makefile | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 19c33bc69bb1..6bfe22b852f2 100644
--- a/Makefile
+++ b/Makefile
@@ -1283,16 +1283,18 @@  all: modules
 # using awk while concatenating to the final file.
 
 PHONY += modules
-modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
-	$(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
+modules: $(if $(KBUILD_BUILTIN),vmlinux) modules.order modules.builtin
 	@$(kecho) '  Building modules, stage 2.';
 	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
 	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/modules-check.sh
 
-modbuiltin-dirs := $(addprefix _modbuiltin_, $(vmlinux-dirs))
+modules.order modules.builtin:
+	$(Q)$(AWK) '!x[$$0]++' $(addsuffix /$@, $(vmlinux-dirs)) > $@
+
+modules.order: $(vmlinux-dirs)
 
+modbuiltin-dirs := $(addprefix _modbuiltin_, $(vmlinux-dirs))
 modules.builtin: $(modbuiltin-dirs)
-	$(Q)$(AWK) '!x[$$0]++' $(addsuffix /$@, $(vmlinux-dirs)) > $@
 
 PHONY += $(modbuiltin-dirs)
 # tristate.conf is not included from this Makefile. Add it as a prerequisite