module: Makefile: simplify clean and install jobs

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12979
This commit is contained in:
наб 2021-12-27 02:21:38 +01:00 committed by Brian Behlendorf
parent 3158c2e3cb
commit c5d8cd63ae
1 changed files with 3 additions and 5 deletions

View File

@ -67,10 +67,8 @@ clean-Linux:
@# is defined. This indicates that kernel modules should be built. @# is defined. This indicates that kernel modules should be built.
@CONFIG_KERNEL_TRUE@ $(MAKE) -C @LINUX_OBJ@ M="$$PWD" @KERNEL_MAKE@ clean @CONFIG_KERNEL_TRUE@ $(MAKE) -C @LINUX_OBJ@ M="$$PWD" @KERNEL_MAKE@ clean
if [ -f @LINUX_SYMBOLS@ ]; then $(RM) @LINUX_SYMBOLS@; fi $(RM) @LINUX_SYMBOLS@ Module.markers
if [ -f Module.markers ]; then $(RM) Module.markers; fi find . -name '*.ur-safe' -type f -delete
find . -name '*.ur-safe' -type f -print | xargs $(RM)
clean-FreeBSD: clean-FreeBSD:
+$(FMAKE) clean +$(FMAKE) clean
@ -86,7 +84,7 @@ modules_install-Linux:
@# Remove extraneous build products when packaging @# Remove extraneous build products when packaging
kmoddir=$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \ kmoddir=$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
if [ -n "$(DESTDIR)" ]; then \ if [ -n "$(DESTDIR)" ]; then \
find $$kmoddir -name 'modules.*' | xargs $(RM); \ find $$kmoddir -name 'modules.*' -delete; \
fi fi
@# Debian ships tiny fake System.map files that are @# Debian ships tiny fake System.map files that are
@# syntactically valid but just say @# syntactically valid but just say