Boost logo

Boost-Build :

Subject: Re: [Boost-build] more bjam questions
From: Stefan Seefeld (stefan_at_[hidden])
Date: 2017-06-08 19:18:56


Hi Steven,

here is a late follow-up question:

On 29.04.2017 13:00, Steven Watanabe via Boost-build wrote:
>> 2) Is there a mechanism to have bjam clean up intermediate files ? For
>> example, if I Use the `exe foo : foo.cpp ;` rule, there will be an
>> intermediate `foo.o` file generated. Can I instruct bjam to remove that
>> automatically in the process once `foo` is created ?
>>
> testing.jam does this. The method is to mark the
> intermediate files as TEMPORARY and then call
> RmTemps $(target) : $(sources) ;
> as the last updating action of the exe.
> There is no high-level interface for this.

It seems bjam internally doesn't recognize intermediate files. I.e., if
I have a dependency graph such as foo -> foo.o -> foo.cpp, then remove
the intermediate foo.o at the end, bjam would in a subsequent invocation
rebuild foo.o and foo, rather than recognizing that foo is up-to-date as
it is newer than foo.cpp, even though the intermediate foo.o does no
longer exist.
Is that not the normal / expected semantic of an intermediate file in
bjam ? Or am I missing something ?

Thanks,
        Stefan

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

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk