diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -1147,9 +1147,28 @@ modules: $(module-dirs) | |||
1147 | $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost | 1147 | $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost |
1148 | 1148 | ||
1149 | .PHONY: modules_install | 1149 | .PHONY: modules_install |
1150 | modules_install: | 1150 | modules_install: _emodinst_ _emodinst_post |
1151 | |||
1152 | install-dir := $(if $(INSTALL_MOD_DIR),$(INSTALL_MOD_DIR),extra) | ||
1153 | .PHONY: _emodinst_ | ||
1154 | _emodinst_: | ||
1155 | $(Q)rm -rf $(MODLIB)/$(install-dir) | ||
1156 | $(Q)mkdir -p $(MODLIB)/$(install-dir) | ||
1151 | $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modinst | 1157 | $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modinst |
1152 | 1158 | ||
1159 | # Run depmod only is we have System.map and depmod is executable | ||
1160 | quiet_cmd_depmod = DEPMOD $(KERNELRELEASE) | ||
1161 | cmd_depmod = if [ -r System.map -a -x $(DEPMOD) ]; then \ | ||
1162 | $(DEPMOD) -ae -F System.map \ | ||
1163 | $(if $(strip $(INSTALL_MOD_PATH)), \ | ||
1164 | -b $(INSTALL_MOD_PATH) -r) \ | ||
1165 | $(KERNELRELEASE); \ | ||
1166 | fi | ||
1167 | |||
1168 | .PHONY: _emodinst_post | ||
1169 | _emodinst_post: _emodinst_ | ||
1170 | $(call cmd,depmod) | ||
1171 | |||
1153 | clean-dirs := $(addprefix _clean_,$(KBUILD_EXTMOD)) | 1172 | clean-dirs := $(addprefix _clean_,$(KBUILD_EXTMOD)) |
1154 | 1173 | ||
1155 | .PHONY: $(clean-dirs) clean | 1174 | .PHONY: $(clean-dirs) clean |