Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40955 )
Change subject: payloads/external/GRUB2: prevent rebuild without actual changes ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/40955/1/payloads/external/GRUB2/Mak... File payloads/external/GRUB2/Makefile:
https://review.coreboot.org/c/coreboot/+/40955/1/payloads/external/GRUB2/Mak... PS1, Line 40: grub2: $(CONFIG_DEP) checkout grub2/build/config.h
Excuse my ignorance, but why is moving `CONFIG_DEP` fixes the issue? […]
Dropping config is just cosmetics, changing CONFIG_DEP is the actual change that makes the difference here:
`CONFIG_DEP` gets set in `payloads/external/Makefile.inc` to `CONFIG_DEP="$(abspath $(obj)/config.h)"`. Make/automake will rebuild a parent target (`grub2`) if one child (`grub2/build/config.h`) gets modified. That means in this case, that a dependency of `grub2` on `grub2/build/config.h` and a dependency of `grub2/build/config.h` on `build/config.h` will result in a rebuild of `grub2/build/config.h` (due to modified `build/config.h`) and finally in a rebuild of `grub2` (due to modified/rebuilt `grub2/build/config.h`).
And I just realized that the dependency of grub2 on `$(obj)/config.h` is already specified in `payloads/external/Makefile.inc` so there is absolutely no need to carry that `CONFIG_DEP` around. Thus, I will drop it, too.