X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=module%2FMakefile.in;h=50cbb58915821623f2550a9867fdea4244fd3faa;hb=739a1a82e0f366923e8d9bc8f9ad4b1c680a780b;hp=d9f73c28786d9cdb8df113dff0918f3f9cfc17c3;hpb=d433c206515e567c52ce09589033405a0ae3716e;p=zfs.git diff --git a/module/Makefile.in b/module/Makefile.in index d9f73c2..50cbb58 100644 --- a/module/Makefile.in +++ b/module/Makefile.in @@ -37,7 +37,11 @@ modules_install: $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \ INSTALL_MOD_PATH=$(DESTDIR) \ INSTALL_MOD_DIR=addon/zfs $@ - find $(DESTDIR)/lib/modules/ -name 'modules.*' | xargs $(RM) + @# Remove extraneous build products when packaging + if [ -n "$(DESTDIR)" ]; then \ + find $(DESTDIR)/lib/modules/@LINUX_VERSION@ \ + -name 'modules.*' | xargs $(RM); \ + fi sysmap=$(DESTDIR)/boot/System.map-@LINUX_VERSION@; \ if [ -f $$sysmap ]; then \ depmod -ae -F $$sysmap @LINUX_VERSION@; \