Skip to content

Commit

Permalink
kbuild: cancel sub_make_done for the install target to fix DKMS
Browse files Browse the repository at this point in the history
[ Upstream commit 14ccc63 ]

Since commit bcf637f ("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: bcf637f ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
masahir0y authored and gregkh committed Aug 12, 2021
1 parent cb1f2a9 commit 9884f60
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Makefile
Expand Up @@ -1366,6 +1366,15 @@ 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 :=

# Kernel selftest

PHONY += kselftest
Expand Down

0 comments on commit 9884f60

Please sign in to comment.