There has been a long-standing request to support building external modules in a separate build directory. The first half is cleanups of documents and Makefiles. The last part adds KBUILD_EXTMOD_OUTPUT (MO=). This is too big changes, and too late for the current MW. (I did not test kselftest at all.) I hope people test this and may uncover some issues. Masahiro Yamada (23): kbuild: doc: update the description about Kbuild/Makefile split kbuild: doc: remove description about grepping CONFIG options kbuild: doc: remove outdated description of the limitation on -I usage kbuild: doc: remove the description about shipped files kbuild: doc: describe the -C option precisely for external module builds kbuild: doc: replace "gcc" in external module description kbuild: remove unnecessary prune of rust/alloc for rustfmt kbuild: simplify find command for rustfmt speakup: use SPKDIR=$(src) to specify the source directory kbuild: refactor the check for missing config files kbuild: check the presence of include/generated/rustc_cfg scripts/nsdeps: use VPATH as src_prefix kbuild: replace two $(abs_objtree) with $(CURDIR) in top Makefile kbuild: add $(objtree)/ prefix to some in-kernel build artifacts kbuild: rename abs_objtree to abs_output kbuild: use 'output' variable to create the output directory kbuild: build external modules in their directory kbuild: remove extmod_prefix, MODORDER, MODULES_NSDEPS variables kbuild: support building external modules in a separate build directory kbuild: support -fmacro-prefix-map for external modules kbuild: use absolute path in the generated wrapper Makefile kbuild: make wrapper Makefile more convenient for external modules kbuild: allow to start building external module in any directory Documentation/dev-tools/coccinelle.rst | 19 +-- Documentation/kbuild/kbuild.rst | 11 ++ Documentation/kbuild/modules.rst | 104 ++++---------- Makefile | 184 ++++++++++++++++--------- drivers/accessibility/speakup/Makefile | 4 +- rust/Makefile | 4 +- scripts/Kbuild.include | 2 +- scripts/Makefile.build | 4 +- scripts/Makefile.compiler | 2 +- scripts/Makefile.modfinal | 16 +-- scripts/Makefile.modinst | 4 +- scripts/Makefile.modpost | 24 ++-- scripts/coccicheck | 6 +- scripts/depmod.sh | 4 +- scripts/nsdeps | 6 +- scripts/package/install-extmod-build | 7 + 16 files changed, 209 insertions(+), 192 deletions(-) -- 2.43.0