Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33198 )
Change subject: Makefile.inc: Add a class 'all' to link files in all stage ......................................................................
Patch Set 8:
(1 comment)
I'd rather go for a new class ("all"?) with special behavior (namely: paste into all other classes).
You have to take Patrick more literally here. We have the notion of a `special-class` ;) It simply means for each of its `$(class)-y` files a `$(class)-handler` is called.
The order in `$(includemakefiles)` is unfortunate atm. If we could move the special-class handling one line up, before the `-srcs +=`, something lean like this could do the job:
$(call add-special-class,all) all-handler = $(foreach class,bootblock verstage...,$(class)-y += $(2))
Given the few special classes we have so far, I think changing the order should be safe. Patrick, what do you think?
https://review.coreboot.org/c/coreboot/+/33198/7/src/arch/x86/Makefile.inc File src/arch/x86/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/33198/7/src/arch/x86/Makefile.inc@1... PS7, Line 117: bootblock-srcs += $(all-srcs)
I'd put this in basedir Makefile. […]
I don't think it can work like this. `*-srcs` is declared with `:=`, so `+= $(all-srcs)` here would add the contents of `$(all-srcs)` that were gathered up to this point but not beyond.