summaryrefslogtreecommitdiff
path: root/scripts/Makefile.lib
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-05-22 05:00:02 +0300
committerMasahiro Yamada <masahiroy@kernel.org>2020-05-25 18:03:16 +0300
commit454753d9f67ae40b6a2142ddb6b4dbdcc9654aa9 (patch)
treeb486a81d82f9eb79eb3942dd3e2d62fa7d405619 /scripts/Makefile.lib
parentaaa385ba9afe7aca25a1545a609963ee59b6c76b (diff)
downloadlinux-454753d9f67ae40b6a2142ddb6b4dbdcc9654aa9.tar.xz
kbuild: make modules.order rule consistent with built-in.a
built-in.a contains the built-in object paths from the current and sub directories. module.order collects the module paths from the current and sub directories. Make their build rules look more symmetrical. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/Makefile.lib')
-rw-r--r--scripts/Makefile.lib2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index a41a4bbd20e2..0d931cc0df94 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -35,7 +35,9 @@ lib-y := $(filter-out $(obj-y), $(sort $(lib-y) $(lib-m)))
# Determine modorder.
# Unfortunately, we don't have information about ordering between -y
# and -m subdirs. Just put -y's first.
+ifdef need-modorder
modorder := $(patsubst %/,%/modules.order, $(filter %/, $(obj-y)) $(obj-m:.o=.ko))
+endif
# Handle objects in subdirs
# ---------------------------------------------------------------------------