Boost logo

Boost-Build :

Subject: Re: [Boost-build] Using 'explicit' targets
From: Edward Diener (eldiener_at_[hidden])
Date: 2016-05-15 17:36:40


On 5/15/2016 4:04 PM, Steven Watanabe wrote:
> AMDG
>
> On 05/15/2016 11:43 AM, Edward Diener wrote:
>> I think the way 'explicit' targets in a jamfile should work is that if
>> you specify any 'explicit' targets b2 should check all targets in the
>> jamfile along with the 'explicit' targets. Instead it only checks the
>> 'explicit' targets if you specify them. I realize this is different from
>> specifying non-explicit targets in a jamfile, but I think that
>> 'explicit' defeats its purpose by not checking all non-explicit targets
>> also when it is being used.
>>
>
> I don't understand what you mean by checking a target.

I should have said 'build a target if it is out of date'.

Let's suppose I have a non-explicit targets 'nonexpl1' and 'nonexpl2'
and explicit target 'expl' in a jamfile. Consider in each of the
situations below that all are always out of date and need to be built. I
invoke:

1) 'b2 jamfile' = both 'nonexpl1' and 'nonexpl2' is built and 'expl' is
not built.
2) 'b2 jamfile nonexpl1' = only 'nonexpl1' is built.
3) 'b2 jamfile nonexpl2' = only 'nonexpl2' is built.
4) 'b2 jamfile nonexpl1 expl' = both 'nonexpl1' and 'expl1' is built and
'nonexpl2' is no built.
5) 'b2 jamfile nonexpl2 expl' = both 'nonexpl2' and 'expl1' is built and
'nonexpl1' is not built.
6) 'b2 jamfile expl' = only 'expl' is built.

I disagree with 6). I think that if you specify an explicit target and
no non-explicit targets then all non-explicit targets should be built.
In other words if I specify only explcit targets to be built I shouldn't
need to specify all the non-explicit targets individually to get them to
be built. In the example above to get all targets to build I must
specify each target in the jamfile. I think this hurts the functionality
of 'explicit' in Boost Build. If I have a jamfile with a bunch of
targets, one of which is explicit, I must tell the end-user that to
build the explicit target it must be passed on the b2 command line but
to build all targets in the jamfile, including the explicit target, he
must pass all targets individually on the command line.


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