Re: [PATCH] i386 arch subdivision into machine types for 2.5.8

Keith Owens (kaos@ocs.com.au)
Wed, 17 Apr 2002 10:55:49 +1000


On Tue, 16 Apr 2002 09:46:09 -0700 (PDT),
Patrick Mochel <mochel@osdl.org> wrote:
>One issue that I encountered along the way was arch/i386/kernel/Makefile.
>I found that you can't easily build multiple targets in the same
>directory, and have dependencies for one target in subdirectories.
>Typically, target objects have one or the other.
>
>In order to make this work, I had to do:
>
>-all: kernel.o head.o init_task.o
>+all: first_rule kernel.o head.o init_task.o
>
>...
>
>+kernel-subdir-$(CONFIG_PCI) += pci
>+subdir-y := $(kernel-subdir-y)
>+obj-y += $(foreach dir,$(subdir-y),$(dir)/$(dir).o)
>
>
>The last part is decent, but the explicit dependency on the first_rule
>target is kinda gross. Is there a better way to do this? Will kbuild 2.5
>make this nicer?

Much nicer.

arch/i386/kernel/Makefile.in

link_subdirs(pci ...)
select(head.o init_task.o)

arch/i386/kernel/pci/Makefile.in

select(foo.o bar.o)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/