On 03.11.2017 13:44, Steven Watanabe via Boost-build wrote:

On 11/03/2017 11:00 AM, Stefan Seefeld via Boost-build wrote:

Are you saying I shouldn't be using the TEMPORARY flag for B.o (et al.) ? How is 
b2 solving this case ?

  In general, you probably shouldn't be using TEMPORARY in cases
where updating the parent requires the TEMPORARY to be created,
as this tends to cause unnecessary rebuilding.
Yeah, it's definitely a tradeoff.
Hmm, bummer, I really misunderstood what TEMPORARY was for, then (and have invested quite a bit of time to get it working for my use-cases).

  If you really
need it, the problem can be worked around using REBUILDS B : B.o ;

I'm not sure this has the same effect. Consider my case of binary B being built from source S via object file O, with O being flagged as TEMPORARY.
As far as B's fate is concerned, that can be computed purely by looking at S, unless O exists, in which case it depends on that, too. But whenever B needs to be updated, O should be updated first, unless it already is up-to-date.

As far as I can tell, "REBUILDS" is used to force-update one target whenever another one is updated. It does not (as far as I can tell) enforce an order, such that B.o would be made before B is attempted to be updated, or does it ?



      ...ich hab' noch einen Koffer in Berlin...