Skip to content

Commit

Permalink
module: Makefile: flatten subdir loop, use $PWD instead of pwd
Browse files Browse the repository at this point in the history
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
  • Loading branch information
nabijaczleweli committed Dec 23, 2021
1 parent f0f74f9 commit 7949bab
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions module/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@ endif
FMAKE = env -u MAKEFLAGS make $(FMAKEFLAGS)

modules-Linux:
list='$(SUBDIR_TARGETS)'; for targetdir in $$list; do \
$(MAKE) -C $$targetdir; \
done
$(MAKE) -C @LINUX_OBJ@ M=`pwd` @KERNEL_MAKE@ CONFIG_ZFS=m modules
list='$(SUBDIR_TARGETS)'; for td in $$list; do $(MAKE) -C $$td; done
$(MAKE) -C @LINUX_OBJ@ M="$$PWD" @KERNEL_MAKE@ CONFIG_ZFS=m modules

modules-FreeBSD:
+$(FMAKE)
Expand All @@ -67,7 +65,7 @@ modules: modules-@ac_system@
clean-Linux:
@# 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@ 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 Module.markers ]; then $(RM) Module.markers; fi
Expand All @@ -81,7 +79,7 @@ clean: clean-@ac_system@

modules_install-Linux:
@# 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_DIR=$(INSTALL_MOD_DIR) \
KERNELRELEASE=@LINUX_VERSION@
Expand Down

0 comments on commit 7949bab

Please sign in to comment.