]> git.baikalelectronics.ru Git - kernel.git/commitdiff
kbuild: cancel sub_make_done for the install target to fix DKMS
authorMasahiro Yamada <masahiroy@kernel.org>
Thu, 29 Jul 2021 00:12:54 +0000 (09:12 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Thu, 5 Aug 2021 11:56:35 +0000 (20:56 +0900)
Since commit bcf637f54f6d ("kbuild: parse C= and M= before changing the
working directory"), external module builds invoked by DKMS fail because
M= option is not parsed.

I wanted to add 'unset sub_make_done' in install.sh but similar scripts,
arch/*/boot/install.sh, are duplicated, so I set sub_make_done empty in
the top Makefile.

Fixes: bcf637f54f6d ("kbuild: parse C= and M= before changing the working directory")
Reported-by: John S Gruber <johnsgruber@gmail.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: John S Gruber <johnsgruber@gmail.com>
Makefile

index 27a072cffcb927d5ebfd100a6be55e584ca22ab6..efb294568f2893fb9407837108d16c5f39744854 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1317,6 +1317,16 @@ PHONY += scripts_unifdef
 scripts_unifdef: scripts_basic
        $(Q)$(MAKE) $(build)=scripts scripts/unifdef
 
+# ---------------------------------------------------------------------------
+# Install
+
+# Many distributions have the custom install script, /sbin/installkernel.
+# If DKMS is installed, 'make install' will eventually recuses back
+# to the this Makefile to build and install external modules.
+# Cancel sub_make_done so that options such as M=, V=, etc. are parsed.
+
+install: sub_make_done :=
+
 # ---------------------------------------------------------------------------
 # Tools