Boost logo

Boost-Build :

Subject: Re: [Boost-build] bjam handling of temps
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2017-11-03 18:38:43


On 11/03/2017 12:14 PM, Stefan Seefeld via Boost-build wrote:
> On 03.11.2017 13:44, Steven Watanabe via Boost-build wrote:
>> 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 ?

  The build order is handled by the the dependency of B on O.
In fact, the lack of build order is the reason for using REBUILDS
in the first place. B should force rebuild O, but that doesn't
mean that B needs to be updated before O (quite the contrary).

I think the three rules together should give the right result:
- DEPENDS causes B to be updated after O and causes
  B and O to update if S is modified.
- TEMPORARY causes O to use the timestamp of B and does not
  rebuild O when O is missing.
- REBUILDS makes sure that O is created when B is
  updated for any reason.

In Christ,
Steven Watanabe

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at