Re: [PATCH] make: add modules_update target

From: Sam Ravnborg
Date: Sat Apr 15 2006 - 04:42:53 EST


On Fri, Apr 14, 2006 at 07:33:39PM -0500, Dustin Kirkland wrote:
> It looks like it may not be easy to drop in modules_update as a more
> efficient alternative to modules_install, but note that is not the patch
> that Kylie submitted...
The problem to be solved is the long time it takes to do
"make modules_install" when working on a single module.
Instead of bringing in more or less complex solutions what about
extending "make dir/module.ko" to include the installation of the
module.

Something like:
"make MI=1 dir/module.ko"
where MI=1 tells us to install the said module.

I'm not particular found of the syntax - anyone with a better proposal?

Untested sample patch below.

Sam

diff --git a/Makefile b/Makefile
index fc8e08c..0c0649c 100644
--- a/Makefile
+++ b/Makefile
@@ -1312,6 +1312,11 @@ # Modules
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
$(build)=$(build-dir) $(@:.ko=.o)
$(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost
+ifneq ($(MI),)
+ cp $@ $(MODLIB)/kernel/$(dir $@)
+ if [ -r System.map -a -x $(DEPMOD) ]; then \
+ $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi
+endif

# FIXME Should go into a make.lib or something
# ===========================================================================
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/