|
Boost-Build : |
Subject: Re: [Boost-build] Using 'explicit' targets
From: Edward Diener (eldiener_at_[hidden])
Date: 2016-05-15 19:32:04
On 5/15/2016 6:58 PM, Steven Watanabe wrote:
> AMDG
>
> On 05/15/2016 03:36 PM, Edward Diener wrote:
>> On 5/15/2016 4:04 PM, Steven Watanabe wrote:
>>>
>>> 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.
>
> Do you really mean to put 'jamfile' on the
> command line?
No. My error. I should have left it off all the examples.
>
>> 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.
>>
>
> The current behavior is more consistent.
> If some targets are specified, then exactly
> those targets will be built, regardless
> of whether they are explicit or not. To
> get the result that you want, you can use:
>
> $ b2 . expl
That's what I need. Is the use of '.' to mean all non-explicit targets
documented anywhere ? If not it should be.
>
> i.e. build the non-explicit targets of the
> project in the current directory and also
> build expl.
>
> As for why the behavior that you propose is
> wrong, consider the following:
>
> $ cd $BOOST_ROOT
> $ b2 stage # builds the libraries in stage/lib
> $ b2 # equivalent to b2 stage
> $ b2 install # Installs the headers and libraries
> in $PREFIX/include and $PREFIX/lib
>
> When we run install, we do not want to run
> stage as well.
Understood by your example.
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