|
From: Andrzej O. <an...@ma...> - 2010-01-26 11:43:48
|
Hi, Heiko Zuerker wrote: > I don't think I understand your request, could you please try to explain? I see, idea with including Makefile.*.custom as for now is unusable. In main Makefile.* is: > PHASE := build > include Makefile.inc > > GROUP_nn := aa bb ... ... > > all : $(GROUP_mm) $(GROUP_nn) ... $(GROUP_CUSTOM_BEFORE_KERNEL) $(GROUP_CUSTOM) > > ... > > # other place for include second level Makefile > > aa: | $(GROUP_mm) > > bb: | $(GROUP_nn) Makefile.inc includes Makefile.*.custom, where I should have: > GROUP_CUSTOM := my_aa my_bb > > GROUP_CUSTOM_BEFORE_KERNEL := > > my_bb: | my_aa > ... but after declaring target "my_bb" as above, my_bb becomes DEFAULT target of make instead of "all" target in main Makefile.* because first declared target becomes default. After this "make build" from chrooted /build directory makes not "all" target but only "my_bb" target and it's dependences. Changing point of include (i.e. after "all" target declaration in main Makefile.*) will give incomplete target "all" as result, because GROUP_CUSTOM variables before include are not defined yet. I suggested three solutions: First: repeating "all" target declaration in Makefile.*.custom as is in main makefile but before first custom target (this is not elegant). Second solution is split Makefile.*.custom into two parts, first including on begining and second just after "all" target. Third solution is calling in build.sh not "make" but explicite "make all" or maybe better "make $CUSTOM_TARGET" and setting this variable in main (first level) Makefile. Using this solution it is possible to build not always all scripts but only one, selected $CUSTOM_TARGET -- this can be sometime usable. I use fourth method: patching main Makefiles via inserting additional grups and targets by scripts. In actual form Makefile.*.custom is hard to use. Best regards -- Andrzej Odyniec |