diff options
| author | Sam Ravnborg <sam@mars.ravnborg.org> | 2006-01-28 17:51:57 -0500 |
|---|---|---|
| committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2006-02-19 03:51:20 -0500 |
| commit | a67dc21a38055ec2d8d85b2f64d98091748569b3 (patch) | |
| tree | 7d9e969b5c7b0b065480f782412a7129c20f1879 | |
| parent | fb3cbd2e575f9ac0700bfa1e7cb9f4119fbd0abd (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>
| -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 |
