module: Makefile: flatten subdir loop, use $PWD instead of `pwd`
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Issue #12899
This commit is contained in:
parent
3b52ccd7d7
commit
77ae804f9e
|
@ -51,10 +51,8 @@ endif
|
||||||
FMAKE = env -u MAKEFLAGS make $(FMAKEFLAGS)
|
FMAKE = env -u MAKEFLAGS make $(FMAKEFLAGS)
|
||||||
|
|
||||||
modules-Linux:
|
modules-Linux:
|
||||||
list='$(SUBDIR_TARGETS)'; for targetdir in $$list; do \
|
list='$(SUBDIR_TARGETS)'; for td in $$list; do $(MAKE) -C $$td; done
|
||||||
$(MAKE) -C $$targetdir; \
|
$(MAKE) -C @LINUX_OBJ@ M="$$PWD" @KERNEL_MAKE@ CONFIG_ZFS=m modules
|
||||||
done
|
|
||||||
$(MAKE) -C @LINUX_OBJ@ M=`pwd` @KERNEL_MAKE@ CONFIG_ZFS=m modules
|
|
||||||
|
|
||||||
modules-FreeBSD:
|
modules-FreeBSD:
|
||||||
+$(FMAKE)
|
+$(FMAKE)
|
||||||
|
@ -67,7 +65,7 @@ modules: modules-@ac_system@
|
||||||
clean-Linux:
|
clean-Linux:
|
||||||
@# Only cleanup the kernel build directories when CONFIG_KERNEL
|
@# Only cleanup the kernel build directories when CONFIG_KERNEL
|
||||||
@# 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
|
if [ -f @LINUX_SYMBOLS@ ]; then $(RM) @LINUX_SYMBOLS@; fi
|
||||||
if [ -f Module.markers ]; then $(RM) Module.markers; fi
|
if [ -f Module.markers ]; then $(RM) Module.markers; fi
|
||||||
|
@ -81,7 +79,7 @@ clean: clean-@ac_system@
|
||||||
|
|
||||||
modules_install-Linux:
|
modules_install-Linux:
|
||||||
@# Install the kernel modules
|
@# Install the kernel modules
|
||||||
$(MAKE) -C @LINUX_OBJ@ M=`pwd` modules_install \
|
$(MAKE) -C @LINUX_OBJ@ M="$$PWD" modules_install \
|
||||||
INSTALL_MOD_PATH=$(INSTALL_MOD_PATH) \
|
INSTALL_MOD_PATH=$(INSTALL_MOD_PATH) \
|
||||||
INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) \
|
INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) \
|
||||||
KERNELRELEASE=@LINUX_VERSION@
|
KERNELRELEASE=@LINUX_VERSION@
|
||||||
|
|
Loading…
Reference in New Issue