[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 3/3] x86/build: Clean up boot/Makefile
On Thu, Apr 14, 2022 at 12:47:08PM +0100, Andrew Cooper wrote: > There are no .S intermediate files, so rework in terms of head-bin-objs. > > No functional change. > > Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> The patch looks fine. Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> > --- > I'm slightly -1 on this, because > > head-bin-objs := $(addprefix $(obj)/,$(head-bin-objs)) > > is substantial obfuscation which I'd prefer to bin. It might be possible to do something that Kbuild does, which would be to teach the build system to look for "$(head-objs)" or maybe "$(head-bin-objs)" when it want to build "head.o". That something that's done in Kbuild I think to build a module from several source files. > Anthony: Why does dropping the targets += line interfere with incremental > builds? With it gone, *.bin are regenerated unconditionally, but I can't see > what would cause that, nor why the normal dependencies on head.o don't work. Try to build with "make V=2", make will display why a target is been rebuild (when this target is built with $(if_changed, ) $(targets) is used by Rules.mk to findout which dependencies files (the .cmd) to load and only load them if the target exist. Then the $(if_changed, ) macro rerun the command if prereq are newer than the target or if the command as changed. Without the .cmd file loaded, the macro would compare the new command to an empty value and so rebuild the target. Now, the *.bin files are regenerated because cmdline.o is been rebuild mostly because make didn't load the record of the previous command run. Thanks, -- Anthony PERARD
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |