Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 594180d8 authored by Bart Van Assche's avatar Bart Van Assche
Browse files

Makefile: Optimize the code for creating the kernel module list



The time needed for executing shell code strongly depends on how many
times the shell has to call fork(). Hence, instead of invoking 'basename'
once per kernel module, invoke 'basename' once for all kernel modules.

Change-Id: Ibe322c8ebf0a466568f902beb5ab91988381678c
Signed-off-by: default avatarBart Van Assche <bvanassche@google.com>
parent 0656d0a4
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -465,9 +465,7 @@ $(3)/$(DEPMOD_STAGING_SUBDIR)/modules.dep: $(1) $(6)
	)
	$(if $(1),\
	  cp $$(PRIVATE_MODULES) $$(PRIVATE_MODULE_DIR)/; \
	  for MODULE in $$(PRIVATE_LOAD_MODULES); do \
	    basename $$$$MODULE >> $$(PRIVATE_LOAD_FILE); \
	  done; \
	  if [ -n "$$(PRIVATE_LOAD_MODULES)" ]; then basename -a $$(PRIVATE_LOAD_MODULES); fi > $$(PRIVATE_LOAD_FILE); \
	)
	# The ln -sf + find -delete sequence is to remove any modules in
	# PRIVATE_EXTRA_MODULES which have same basename as MODULES in PRIVATE_MODULES