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
....
Which has problems, and looks bad. I've got it currently working with
subdir-$(CONFIG_FOO) += foo
tools-$(CONFIG_FOO) := fooboot # := since you can only have 1 set
And a rule for making tools. But, to get the targets working I had to do:
# These are dirs we don't want to go into on BOOT_TARGETS
NONBOOT := lib images common
# These are the subdirs we want to use
BOOTDIRS = $(filter-out $(NONBOOT), $(subdir-y))
subdir-zImage-list = $(sort $(patsubst %,_bdzI_%,$(BOOTDIRS)))
$(subdir-zImage-list) : dummy
$(MAKE) -C $(patsubst _bdzI_%,%,$@) zImage
zImage: sImage ... maketools $(subdir-zImage-list)
For each of the targets. Is there a nicer way to do this? Thanks.
--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
_______________________________________________
kbuild-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/kbuild-devel