blob: 8e9debb781d15996098e2c25efce7544e27c240f (
plain) (
tree)
|
|
# SPDX-License-Identifier: GPL-2.0
# ==========================================================================
# Installing modules
# ==========================================================================
PHONY := __modinst
__modinst:
include $(srctree)/scripts/Kbuild.include
modules := $(sort $(shell cat $(MODORDER)))
ifeq ($(KBUILD_EXTMOD),)
dst := $(MODLIB)/kernel
else
INSTALL_MOD_DIR ?= extra
dst := $(MODLIB)/$(INSTALL_MOD_DIR)
endif
modules := $(patsubst $(extmod_prefix)%, $(dst)/%, $(modules))
__modinst: $(modules)
@:
# Don't stop modules_install if we can't sign external modules.
quiet_cmd_install = INSTALL $@
cmd_install = \
mkdir -p $(dir $@); cp $< $@; \
$(mod_strip_cmd) $@; \
$(mod_sign_cmd) $@ $(patsubst %,|| true,$(KBUILD_EXTMOD)) ; \
$(mod_compress_cmd) $@
$(modules): $(dst)/%: $(extmod_prefix)% FORCE
$(call cmd,install)
PHONY += FORCE
FORCE:
.PHONY: $(PHONY)
|