> > By the way, there seems to be a lot of unnecessary build activity when > a single module is changed. For example: > > [stern@iolanthe usb-2.6]$ make drivers/usb/gadget/ > CHK include/linux/version.h > CHK include/generated/utsrelease.h > CALL scripts/checksyscalls.sh > [stern@iolanthe usb-2.6]$ touch drivers/usb/gadget/printer.c > [stern@iolanthe usb-2.6]$ make drivers/usb/gadget/ > CHK include/linux/version.h > CHK include/generated/utsrelease.h > CALL scripts/checksyscalls.sh > CC [M] drivers/usb/gadget/printer.o > LD [M] drivers/usb/gadget/g_zero.o > LD [M] drivers/usb/gadget/g_ether.o > LD [M] drivers/usb/gadget/gadgetfs.o > LD [M] drivers/usb/gadget/g_file_storage.o > LD [M] drivers/usb/gadget/g_serial.o > LD [M] drivers/usb/gadget/g_printer.o > LD [M] drivers/usb/gadget/g_cdc.o > > It's perfectly understandable that printer.o and g_printer.o need to be > rebuilt. But why all those other "LD [M]" lines? Good question... $ make allmodconfig ... $ make drivers/usb/gadget/ ... $ make drivers/usb/gadget/ CHK include/linux/version.h CHK include/generated/utsrelease.h CALL scripts/checksyscalls.sh $ touch drivers/usb/gadget/printer.c $ make V=2 drivers/usb/gadget/ CHK include/linux/version.h CHK include/generated/utsrelease.h CALL scripts/checksyscalls.sh - due to target is PHONY CC [M] drivers/usb/gadget/printer.o - due to: drivers/usb/gadget/printer.c LD [M] drivers/usb/gadget/g_zero.o - due to: drivers/usb/gadget/printer.o LD [M] drivers/usb/gadget/g_audio.o - due to: drivers/usb/gadget/printer.o LD [M] drivers/usb/gadget/g_ether.o - due to: drivers/usb/gadget/printer.o LD [M] drivers/usb/gadget/gadgetfs.o - due to: drivers/usb/gadget/printer.o LD [M] drivers/usb/gadget/g_file_storage.o - due to: drivers/usb/gadget/printer.o LD [M] drivers/usb/gadget/g_mass_storage.o - due to: drivers/usb/gadget/printer.o LD [M] drivers/usb/gadget/g_serial.o - due to: drivers/usb/gadget/printer.o LD [M] drivers/usb/gadget/g_printer.o - due to: drivers/usb/gadget/printer.o LD [M] drivers/usb/gadget/g_midi.o - due to: drivers/usb/gadget/printer.o LD [M] drivers/usb/gadget/g_cdc.o - due to: drivers/usb/gadget/printer.o LD [M] drivers/usb/gadget/g_hid.o - due to: drivers/usb/gadget/printer.o LD [M] drivers/usb/gadget/g_dbgp.o - due to: drivers/usb/gadget/printer.o LD [M] drivers/usb/gadget/g_multi.o - due to: drivers/usb/gadget/printer.o LD [M] drivers/usb/gadget/g_nokia.o - due to: drivers/usb/gadget/printer.o LD [M] drivers/usb/gadget/g_webcam.o - due to: drivers/usb/gadget/printer.o Yup - this is a limitation in kbuild... >From Makefile.build: # We would rather have a list of rules like # foo.o: $(foo-objs) # but that's not so easy, so we rather make all composite objects depend # on the set of all their parts We do not properly handle the prerequisites of individual composite modules. So a composite module depend on all .o files used in any composite module (in the same dir). Sam -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html