Re: [PATCH] make: add modules_update target

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux