aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 20 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index fdb3dac3e70f..c55d0f1b85ec 100644
--- a/Makefile
+++ b/Makefile
@@ -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
1150modules_install: 1150modules_install: _emodinst_ _emodinst_post
1151
1152install-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
1160quiet_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
1153clean-dirs := $(addprefix _clean_,$(KBUILD_EXTMOD)) 1172clean-dirs := $(addprefix _clean_,$(KBUILD_EXTMOD))
1154 1173
1155.PHONY: $(clean-dirs) clean 1174.PHONY: $(clean-dirs) clean