aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/Makefile.in9
1 files changed, 5 insertions, 4 deletions
diff --git a/module/Makefile.in b/module/Makefile.in
index 05c673231..b15ab9109 100644
--- a/module/Makefile.in
+++ b/module/Makefile.in
@@ -1,6 +1,7 @@
include Kbuild
INSTALL_MOD_DIR ?= extra
+INSTALL_MOD_PATH ?= $(DESTDIR)
SUBDIR_TARGETS = icp lua zstd
@@ -81,15 +82,15 @@ clean: clean-@ac_system@
modules_install-Linux:
@# Install the kernel modules
$(MAKE) -C @LINUX_OBJ@ M=`pwd` modules_install \
- INSTALL_MOD_PATH=$(DESTDIR)$(INSTALL_MOD_PATH) \
+ INSTALL_MOD_PATH=$(INSTALL_MOD_PATH) \
INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) \
KERNELRELEASE=@LINUX_VERSION@
@# Remove extraneous build products when packaging
- kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
+ kmoddir=$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
if [ -n "$(DESTDIR)" ]; then \
find $$kmoddir -name 'modules.*' | xargs $(RM); \
fi
- sysmap=$(DESTDIR)$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \
+ sysmap=$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \
if [ -f $$sysmap ]; then \
depmod -ae -F $$sysmap @LINUX_VERSION@; \
fi
@@ -102,7 +103,7 @@ modules_install: modules_install-@ac_system@
modules_uninstall-Linux:
@# Uninstall the kernel modules
- kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
+ kmoddir=$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
for objdir in $(ZFS_MODULES); do \
$(RM) -R $$kmoddir/$(INSTALL_MOD_DIR)/$$objdir; \
done