From 966e5200d35a2c38cdb9e14bfaf698a10b31603b Mon Sep 17 00:00:00 2001 From: Darik Horn Date: Fri, 13 Jan 2012 22:20:07 -0600 Subject: Fix `make distclean` for `--with-config=user` 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 --- module/Makefile.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'module/Makefile.in') diff --git a/module/Makefile.in b/module/Makefile.in index 355089aeb..0a7fd02a3 100644 --- a/module/Makefile.in +++ b/module/Makefile.in @@ -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: -- cgit v1.2.3