[Tom Rini]
> Hello all. I've got a question about doing subdirs 'properly'. First,
> what I'm trying to do is cleanup arch/ppc/boot/Makefile. In Linus' tree,
> it's not too bad. But there's a bunch of changes pending, which end up
> leaving the tree looking like this:
>
> # Targets for booting
> BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd
> $(BOOT_TARGETS): sImage vmapus images/vmlinux.gz ....
> ifdef CONFIG_FOO
> $(MAKE) -C utils fooboot
> $(MAKE) -C foo $@
> endif
> ifdef CONFIG_BAR
> $(MAKE) -C utils barboot bazboot
> $(MAKE) -C bar $@
> endif
> ....
utils-$(CONFIG_FOO) += fooboot
utils-$(CONFIG_BAR) += barboot bazboot
bootdirs-$(CONFIG_FOO) += foo
bootdirs-$(CONFIG_BAR) += bar
# Targets for booting
BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd
$(BOOT_TARGETS): sImage vmapus images/vmlinux.gz ....
$(MAKE) -C utils $(utils-y)
for d in $(bootdirs-y); do $(MAKE) -C $$d $@; done
The point here is that you don't use $(subdir-y) for the sub-arch boot
dirs.
If you can assume that CONFIG_FOO and CONFIG_BAR are mutually
exclusive, you don't need the for loop.
Does this do what you want?
Peter
_______________________________________________
kbuild-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/kbuild-devel