Commit 7d2d8fe0 authored by Andreas Gruenbacher's avatar Andreas Gruenbacher Committed by Sam Ravnborg

kbuild: modules_install for external modules must not remove existing modules

When installing external modules with `make modules_install', the
first thing that happens is a rm -rf of the target directory. This
works only once, and breaks when installing more than one (set of)
external module(s).
With following fix we have the functionality:
- for a in-kernel modules_install the $(MODLIB)/kernel directory will be
  deleted before module installation
- for external modules the existing modules will be left as is assuming
  one may be building and installign several external modules
Signed-off-by: default avatarAndreas Gruenbacher <agruen@suse.de>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent aa360879
...@@ -1112,7 +1112,6 @@ modules_install: _emodinst_ _emodinst_post ...@@ -1112,7 +1112,6 @@ modules_install: _emodinst_ _emodinst_post
install-dir := $(if $(INSTALL_MOD_DIR),$(INSTALL_MOD_DIR),extra) install-dir := $(if $(INSTALL_MOD_DIR),$(INSTALL_MOD_DIR),extra)
PHONY += _emodinst_ PHONY += _emodinst_
_emodinst_: _emodinst_:
$(Q)rm -rf $(MODLIB)/$(install-dir)
$(Q)mkdir -p $(MODLIB)/$(install-dir) $(Q)mkdir -p $(MODLIB)/$(install-dir)
$(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modinst $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modinst
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment