path: root/scripts/Makefile.lib
diff options
authorMasahiro Yamada <>2020-05-22 11:00:02 +0900
committerMasahiro Yamada <>2020-05-26 00:03:16 +0900
commit454753d9f67ae40b6a2142ddb6b4dbdcc9654aa9 (patch)
treeb486a81d82f9eb79eb3942dd3e2d62fa7d405619 /scripts/Makefile.lib
parentaaa385ba9afe7aca25a1545a609963ee59b6c76b (diff)
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 <>
Diffstat (limited to 'scripts/Makefile.lib')
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))
# Handle objects in subdirs
# ---------------------------------------------------------------------------