]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Prevent rm modules.* when make install
authortuxoko <tuxoko@gmail.com>
Fri, 20 Nov 2015 01:39:56 +0000 (17:39 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 2 Dec 2015 22:38:20 +0000 (14:38 -0800)
This was originally in e80cd06b8e0428f3ca2c62e4cb0e4ec54fda1d5c, but somehow
was changed and not working anymore. And it will cause the following error:

modprobe: ERROR: ../libkmod/libkmod.c:506 lookup_builtin_file() could not open builtin file '/lib/modules/4.2.0-18-generic/modules.builtin.bin'

Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #501

module/Makefile.in

index 41c10101ed26f6104fcbf8649d2b25d6517c53af..d4e62e152193c28eb3afd65a3249e74cf229b65e 100644 (file)
@@ -26,7 +26,7 @@ modules_install:
                KERNELRELEASE=@LINUX_VERSION@
        @# Remove extraneous build products when packaging
        kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
-       if [ -n $$kmoddir ]; then \
+       if [ -n "$(DESTDIR)" ]; then \
                find $$kmoddir -name 'modules.*' | xargs $(RM); \
        fi
        sysmap=$(DESTDIR)$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \