Commit 5cfce896 authored by Brian Gerst's avatar Brian Gerst Committed by Linus Torvalds

[PATCH] kbuild: clean up module install rules

Consolidate rules for installing internal and external modules.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 43610b32
......@@ -16,20 +16,10 @@ modules := $(patsubst %.o,%.ko,$(wildcard $(__modules:.ko=.o)))
__modinst: $(modules)
@:
# Modules built within the kernel tree
quiet_cmd_modules_install = INSTALL $@
cmd_modules_install = mkdir -p $(MODLIB)/kernel/$(@D); \
cp $@ $(MODLIB)/kernel/$(@D)
$(filter-out ../% /%,$(modules)):
$(call cmd,modules_install)
# Modules built outside just go into extra
cmd_modules_install = mkdir -p $(2); cp $@ $(2)
quiet_cmd_modules_install_extra = INSTALL $(obj-m:.o=.ko)
cmd_modules_install_extra = mkdir -p $(MODLIB)/extra; \
cp $@ $(MODLIB)/extra
modinst_dir = $(MODLIB)/$(if $(filter ../% /%,$@),extra/,kernel/$(@D))
$(filter ../% /%,$(modules)):
$(call cmd,modules_install_extra)
$(modules):
$(call cmd,modules_install,$(modinst_dir))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment