[coreboot-gerrit] Change in coreboot[master]: Makefile.inc: Fix dependency tracking of fmap{_config.h, .desc}

Alex Thiessen (Code Review) gerrit at coreboot.org
Sat Sep 15 18:18:33 CEST 2018


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.


-- 
To view, visit https://review.coreboot.org/28198
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic7ecb88cf7df7f2488defd47ea02255fc10a67e9
Gerrit-Change-Number: 28198
Gerrit-PatchSet: 2
Gerrit-Owner: Nico Huber <nico.h at gmx.de>
Gerrit-Reviewer: Martin Roth <martinroth at google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi at google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>
Gerrit-CC: Alex Thiessen <alex.thiessen.de+coreboot at gmail.com>
Gerrit-CC: Elyes HAOUAS <ehaouas at noos.fr>
Gerrit-Comment-Date: Sat, 15 Sep 2018 16:18:33 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180915/c738baac/attachment.html>


More information about the coreboot-gerrit mailing list