From d28c5c4f0472e9674d34f8237ba14187669dad7c Mon Sep 17 00:00:00 2001 From: tuxoko Date: Thu, 19 Nov 2015 17:39:56 -0800 Subject: [PATCH] Prevent rm modules.* when make install 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 Signed-off-by: Brian Behlendorf Closes #501 --- module/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/Makefile.in b/module/Makefile.in index 41c10101e..d4e62e152 100644 --- a/module/Makefile.in +++ b/module/Makefile.in @@ -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@; \ -- 2.40.0