Boost logo

Boost-Build :

Subject: [Boost-build] Rule referenced by <conditional> is invoked twice
From: dimak (dvb.kharkov_at_[hidden])
Date: 2012-07-23 15:56:11


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.

Thank you for your time,
Kind regards,
Dima Kinoshenko

--
View this message in context: http://boost.2283326.n4.nabble.com/Rule-referenced-by-conditional-is-invoked-twice-tp4633468.html
Sent from the Boost - Build mailing list archive at Nabble.com.

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