aboutsummaryrefslogtreecommitdiffstats
path: root/module/Makefile.in
diff options
context:
space:
mode:
authorDarik Horn <[email protected]>2012-01-13 22:20:07 -0600
committerBrian Behlendorf <[email protected]>2012-01-17 10:06:00 -0800
commit966e5200d35a2c38cdb9e14bfaf698a10b31603b (patch)
tree64954ac00bd4c30e128884a662e0d4aa9c091677 /module/Makefile.in
parent0b14b9f32729f0e4b2c9da8b19a2bd848781d683 (diff)
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 <[email protected]>
Diffstat (limited to 'module/Makefile.in')
-rw-r--r--module/Makefile.in7
1 files changed, 5 insertions, 2 deletions
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: