aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSam Ravnborg <sam@mars.ravnborg.org>2006-01-28 17:51:57 -0500
committerSam Ravnborg <sam@mars.ravnborg.org>2006-02-19 03:51:20 -0500
commita67dc21a38055ec2d8d85b2f64d98091748569b3 (patch)
tree7d9e969b5c7b0b065480f782412a7129c20f1879 /Makefile
parentfb3cbd2e575f9ac0700bfa1e7cb9f4119fbd0abd (diff)
kbuild: run depmod when installing external modules
Following patch enables depmod support when installing external modules. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 20 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index fdb3dac3e70..c55d0f1b85e 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