kbuild: cancel sub_make_done for the install target to fix DKMS
PATCH 1/1 kbuild: cancel sub_make_done for the install target to fix DKMS
Since commit bcf637f54f6d ("kbuild: parse C= and M= before changing the working directory"), external modules invoked by DKMS fail to build 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.
---
Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+)
Makefile +10 -0
@@ -1316,6 +1316,16 @@ PHONY += scripts_unifdef scripts_unifdef: scripts_basic $(Q)$(MAKE) $(build)=scripts scripts/unifdef +# --------------------------------------------------------------------------- +# Install + +# Many distros have the custom install script, /sbin/kernelinstall. +# 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
Signature · 1 line
2.27.0
Quoted 39 lines · Masahiro Yamada
Since commit
bcf637f54f6d("kbuild: parse C= and M= before changing the working directory"), external modules invoked by DKMS fail to build because M= option is not parsed.I wanted to add 'unset
sub_make_done' ininstall.shbut similar scripts,arch/*/boot/install.sh, are duplicated, so I setsub_make_doneempty in the topMakefile.Fixes bcf637f54f6d ("kbuild: parse C= and M= before changing the working directory")Reported-by John S Gruber <[email protected]>Signed-off-by Masahiro Yamada <[email protected]>---
Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+)Makefile +10
-1@@ -1316,6 +1316,16 @@ PHONY += scripts_unifdef scripts_unifdef: scripts_basic $(Q)$(MAKE) $(build)=scripts scripts/unifdef +# --------------------------------------------------------------------------- +# Install + +# Many distros have the custom install script, /sbin/kernelinstall. +# 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 --
Quoted 2 lines
2.27.0
This patch tested successfully on my system on 5.14.0-rc3.
Quoted 27 lines · John S Gruber
Quoted 25 lines · Masahiro Yamada
Since commit
bcf637f54f6d("kbuild: parse C= and M= before changing the working directory"), external modules invoked by DKMS fail to build because M= option is not parsed.I wanted to add 'unset
sub_make_done' ininstall.shbut similar scripts,arch/*/boot/install.sh, are duplicated, so I setsub_make_doneempty in the topMakefile.Fixes bcf637f54f6d ("kbuild: parse C= and M= before changing the working directory")Reported-by John S Gruber <[email protected]>Signed-off-by Masahiro Yamada <[email protected]>---
Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+)Makefile +0
-0@@ -1316,6 +1316,16 @@ PHONY += scripts_unifdef scripts_unifdef: scripts_basic $(Q)$(MAKE) $(build)=scripts scripts/unifdef
Quoted 4 lines
Makefile PHONY += scripts_unifdef · line 1322
Quoted 4 lines
Makefile +4
-0+# --------------------------------------------------------------------------- +# Install + +# Many distros have the custom install script, /sbin/kernelinstall.
I fixed up /sbin/kernelinstall to /sbin/installkernel
Applied to linux-kbuild.
Quoted 14 lines
Quoted 10 lines
Makefile +6
-1+# 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 --Quoted 2 lines
2.27.0
This patch tested successfully on my system on 5.14.0-rc3.
Signature · 2 lines
Best Regards Masahiro Yamada