aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/Makefile.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/module/Makefile.in b/module/Makefile.in
index 78e48147a..d9f73c287 100644
--- a/module/Makefile.in
+++ b/module/Makefile.in
@@ -24,7 +24,10 @@ modules:
$(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@
clean:
- $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@
+ @# 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 @SPL_SYMBOLS@ ]; then $(RM) @SPL_SYMBOLS@; fi
if [ -f @LINUX_SYMBOLS@ ]; then $(RM) @LINUX_SYMBOLS@; fi
if [ -f Module.markers ]; then $(RM) Module.markers; fi