summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authortuxoko <[email protected]>2015-11-19 17:39:56 -0800
committerBrian Behlendorf <[email protected]>2015-12-02 14:38:20 -0800
commitd28c5c4f0472e9674d34f8237ba14187669dad7c (patch)
tree2b6e768ba51c44f6d7602f0c6665a94b493d2387 /module
parent5578f58bdc65d8a2d49b34be21f979bd1fcb0093 (diff)
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 <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #501
Diffstat (limited to 'module')
-rw-r--r--module/Makefile.in2
1 files changed, 1 insertions, 1 deletions
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@; \