summaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.modinst
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2008-01-01 13:40:28 +0100
committerSam Ravnborg <sam@ravnborg.org>2008-01-28 23:14:36 +0100
commit9b213118fa4b79afe9a2718faca244ac581a96b6 (patch)
tree4d7dc9875a3d64b1da47ee2d8b95876791c6c15c /scripts/Makefile.modinst
parent7998a731664ac4988b349e70669bac11e3b3a3ac (diff)
downloadlinux-stable-9b213118fa4b79afe9a2718faca244ac581a96b6.tar.gz
linux-stable-9b213118fa4b79afe9a2718faca244ac581a96b6.tar.bz2
linux-stable-9b213118fa4b79afe9a2718faca244ac581a96b6.zip
kbuild: fix installing external modules
Eric Sandeen <sandeen@redhat.com> reported: Installing external modules is supposed to put them in some path under /lib/modules/<version>/extra/subdir/, but this change: http://linux.bkbits.net:8080/linux-2.6/?PAGE=cset&REV=1.1982.9.23 makes them go under /lib/modules/<version>/extrasubdir (for example, make M=fs/ext3 modules_install puts ext3.ko in /lib/modules/<version>/extrafs/ext3.ko) This was the case only when specifying a trailing slash to M=.. Fixed by removing trailing slash if present so we correctly match dir part of target. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Eric Sandeen <sandeen@redhat.com>
Diffstat (limited to 'scripts/Makefile.modinst')
-rw-r--r--scripts/Makefile.modinst2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst
index f0ff248f5e6f..efa5d940e632 100644
--- a/scripts/Makefile.modinst
+++ b/scripts/Makefile.modinst
@@ -21,7 +21,7 @@ quiet_cmd_modules_install = INSTALL $@
# Modules built outside the kernel source tree go into extra by default
INSTALL_MOD_DIR ?= extra
-ext-mod-dir = $(INSTALL_MOD_DIR)$(subst $(KBUILD_EXTMOD),,$(@D))
+ext-mod-dir = $(INSTALL_MOD_DIR)$(subst $(patsubst %/,%,$(KBUILD_EXTMOD)),,$(@D))
modinst_dir = $(if $(KBUILD_EXTMOD),$(ext-mod-dir),kernel/$(@D))