Blame view
scripts/Makefile.modinst
1.05 KB
b24413180
|
1 |
# SPDX-License-Identifier: GPL-2.0 |
1da177e4c
|
2 3 4 |
# ========================================================================== # Installing modules # ========================================================================== |
4f1933620
|
5 |
PHONY := __modinst |
1da177e4c
|
6 |
__modinst: |
8ec4b4ff1
|
7 |
include scripts/Kbuild.include |
1da177e4c
|
8 |
|
d56aec102
|
9 |
modules := $(sort $(shell cat $(if $(KBUILD_EXTMOD),$(KBUILD_EXTMOD)/)modules.order)) |
1da177e4c
|
10 |
|
4f1933620
|
11 |
PHONY += $(modules) |
1da177e4c
|
12 13 |
__modinst: $(modules) @: |
f6a79af8f
|
14 |
# Don't stop modules_install if we can't sign external modules. |
1da177e4c
|
15 |
quiet_cmd_modules_install = INSTALL $@ |
40e42f6a2
|
16 17 18 19 |
cmd_modules_install = \ mkdir -p $(2) ; \ cp $@ $(2) ; \ $(mod_strip_cmd) $(2)/$(notdir $@) ; \ |
f84dde10d
|
20 |
$(mod_sign_cmd) $(2)/$(notdir $@) $(patsubst %,|| true,$(KBUILD_EXTMOD)) ; \ |
beb50df39
|
21 |
$(mod_compress_cmd) $(2)/$(notdir $@) |
1da177e4c
|
22 23 24 |
# Modules built outside the kernel source tree go into extra by default INSTALL_MOD_DIR ?= extra |
9b213118f
|
25 |
ext-mod-dir = $(INSTALL_MOD_DIR)$(subst $(patsubst %/,%,$(KBUILD_EXTMOD)),,$(@D)) |
1da177e4c
|
26 27 28 29 30 |
modinst_dir = $(if $(KBUILD_EXTMOD),$(ext-mod-dir),kernel/$(@D)) $(modules): $(call cmd,modules_install,$(MODLIB)/$(modinst_dir)) |
4f1933620
|
31 |
|
4f1933620
|
32 |
.PHONY: $(PHONY) |