summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-02-14 06:05:16 +0300
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-02-20 03:42:46 +0300
commit648ad9b19f43b7bc2c1a47ddd487c69364987ec9 (patch)
tree2c976a65843d16c1984d0b6cd5806cb69bfa29d3 /Makefile
parent1d8001ef358da16f0ca64ab7fae9f34d7b91101e (diff)
downloadlinux-648ad9b19f43b7bc2c1a47ddd487c69364987ec9.tar.xz
kbuild: set KBUILD_MODULES=1 all the time for single target %/
It is fine to set KBUILD_MODULES=1 when CONFIG_MODULES is disabled. It is actually how "make allnoconfig all" works. On the other hand, KBUILD_MODULES=1 is unneeded for the %.ko pattern. It is just a matter of whether modules.order is generated or not. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 3 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 660e10ac2012..cacb7515a10b 100644
--- a/Makefile
+++ b/Makefile
@@ -1716,16 +1716,13 @@ endif
# Modules
/: prepare FORCE
- $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
- $(build)=$(build-dir)
+ $(Q)$(MAKE) KBUILD_MODULES=1 $(build)=$(build-dir)
# Make sure the latest headers are built for Documentation
Documentation/ samples/: headers_install
%/: prepare FORCE
- $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
- $(build)=$(build-dir)
+ $(Q)$(MAKE) KBUILD_MODULES=1 $(build)=$(build-dir)
%.ko: prepare FORCE
- $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
- $(build)=$(build-dir) $(@:.ko=.o)
+ $(Q)$(MAKE) $(build)=$(build-dir) $(@:.ko=.o)
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
# FIXME Should go into a make.lib or something