Remove Module.markers and Module.symver{s} in clean target

Split 'modules' and 'clean' Makefile targets to allow us to
cleanly remove the Module.* build products with a 'make clean'.
This commit is contained in:
Brian Behlendorf 2010-03-08 13:45:51 -08:00
parent fd7578215e
commit 3d7cfde000
1 changed files with 7 additions and 1 deletions

View File

@ -4,11 +4,17 @@ subdir-m += unicode
subdir-m += zcommon subdir-m += zcommon
subdir-m += zfs subdir-m += zfs
modules clean: modules:
# Make the exported SPL symbols available to these modules. # Make the exported SPL symbols available to these modules.
cp @SPL_OBJ@/@SPL_SYMBOLS@ . cp @SPL_OBJ@/@SPL_SYMBOLS@ .
$(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@ $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@
clean:
$(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
modules_install: modules_install:
$(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \ $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \
INSTALL_MOD_PATH=$(DESTDIR) \ INSTALL_MOD_PATH=$(DESTDIR) \