Alex Thiessen has posted comments on this change. ( https://review.coreboot.org/28198 )
Change subject: Makefile.inc: Fix dependency tracking of fmap{_config.h,.desc} ......................................................................
Patch Set 2:
Patch Set 2:
Patch Set 2:
The code looks quite strange and in fact, these are false dependencies. If you e.g. `touch fmap.fmap`, `make` will call `true` in an attempt to update `fmap_config.h`, every time without real success.
If you have a recipe like the one for `fmap.fmap` that builds a number of targets, then the right thing to do is to define multiple targets in the rule: https://www.gnu.org/software/make/manual/html_node/Multiple-Targets.html
Feel free to update the fix :)
well, don't touch fmap.fmap then :)
The problem with multiple targets in make is that it's just a shorthand:
a b c: d foo
means that it call foo to generate a, call foo to generate b, and call foo to generate c. in a parallelized build, it will even call them in parallel, which means you have three processes trying to write to the same three files at the same time - which might or might not work out well (nevermind the additional build load)
You're right, guess I forgot to think about that. But then, order-only dependencies should do the job.
It would be a nice exercise to make the build interlock for the three files, to get rid of these dependency games altogether.