Boost logo

Boost-Build :

Subject: Re: [Boost-build] Rule referenced by <conditional> is invoked twice
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2012-07-23 16:15:21


AMDG

On 07/23/2012 12:56 PM, dimak wrote:
> Hi guys,
>
> Could you please clarify why the rule defined at <conditional> (in
> requirements) is invoked twice, not once. In my case, this behavior leads to
> unwanted side effects. For example, when executing such piece of jam code
> (reworked example/hello/jamroot.jam):
>
>>>>
> rule cond-rule ( properties * )
> {
> ECHO Conditional is invoked ;
> }
>
> exe hello : hello.cpp : <conditional>@cond-rule ;
> <<<
>
> "Conditional is invoked" is printed twice.
>
> Is it a bug or a feature? :) To protect myself, I can use some counters or
> flags so that avoid twice calculation of additional "run-time" properties,
> but it looks quite ugly.
>

It's a feature. Conditionals are run
until they converge to a fixed point.

In Christ,
Steven Watanabe


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