]> git.proxmox.com Git - mirror_spl.git/commitdiff
Fix `make distclean` for `--with-config=user`
authorDarik Horn <dajhorn@vanadac.com>
Sat, 14 Jan 2012 04:20:07 +0000 (22:20 -0600)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 17 Jan 2012 18:06:00 +0000 (10:06 -0800)
Apply the same fix to SPL that was applied to ZFS earlier at:
zfsonlinux/zfs@d433c206515e567c52ce09589033405a0ae3716e

Additionally quote @LINUX_SYMBOLS@ because it is a null substitution
in this configuration, which results in a `[ -f  ]` expression that
incorrectly evaluates to true.

  # ./configure --with-config=user
  # make distclean

  Making distclean in module
  make[1]: Entering directory `/spl/module'
  make -C  SUBDIRS=`pwd`  clean
  make: Entering an unknown directory
  make: *** SUBDIRS=/spl/module: No such file or directory.  Stop.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
module/Makefile.in

index 355089aeb78733366ee1068cd7e26080d57ca79c..0a7fd02a3a5778ad9172f2a15d5efd1374139325 100644 (file)
@@ -7,8 +7,11 @@ modules:
        $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@
 
 clean:
-       $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@
-       if [ -f @LINUX_SYMBOLS@ ]; then $(RM) @LINUX_SYMBOLS@; fi
+       @# Only cleanup the kernel build directories when CONFIG_KERNEL
+       @# is defined.  This indicates that kernel modules should be built.
+@CONFIG_KERNEL_TRUE@   $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@
+
+       if [ -f '@LINUX_SYMBOLS@' ]; then $(RM) '@LINUX_SYMBOLS@'; fi
        if [ -f Module.markers ]; then $(RM) Module.markers; fi
 
 modules_install: