]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
kbuild: split modules.order build rule out of 'modules' target
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Sun, 23 Jun 2019 16:13:28 +0000 (01:13 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 1 Jul 2019 01:09:28 +0000 (10:09 +0900)
modules.order is a real target. Split its build rule out like
modules.builtin

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

index f8e4f930e4976709f8fe9eb42504705cfd038434..c3b6dcd5b177d9bec671e556e47d6f111ccf977c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1286,12 +1286,14 @@ 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
 
+modules.order: $(vmlinux-dirs)
+       $(Q)$(AWK) '!x[$$0]++' $(addsuffix /$@, $(vmlinux-dirs)) > $@
+
 modbuiltin-dirs := $(addprefix _modbuiltin_, $(vmlinux-dirs))
 
 modules.builtin: $(modbuiltin-dirs)