Boost logo

Boost-Build :

Subject: [Boost-build] Usage of complex expressions in regular if-statements apart from string literals.
From: dimak (dvb.kharkov_at_[hidden])
Date: 2012-07-19 05:23:06


Hi bjam gurus.

I am kindly asking you if it is possible to extend without much pain bjam
functionality in order to support complex expressions (like per-lists
comparisons or rule invocations) in regular if-statements?
For example, it is not possible for now to perform neither such comparison:
if "bla" "bla" = "bla" "bla"
{
    ECHO Yes! ;
}
else
{
    ECHO No... ;
}

nor such (with grouping):
if ("bla" "bla") = ("bla" "bla")
{
    ECHO Yes! ;
}
else
{
    ECHO No... ;
}

The following works OK:
if ( "bla""bla" ) = ( "bla""bla" )
{
    ECHO Yes! ;
}
else
{
    ECHO No... ;
}

but we cannot use it when for example invoking a rule:
if ( [ rule-that-returns-bla ] "bla" ) = ( "bla""bla" )
{
    ECHO Yes! ;
}
else
{
    ECHO No... ;
}
Note that we cannot use [ rule-that-returns-bla ]"bla" as one word... (it's
a topic of my previous post
http://boost.2283326.n4.nabble.com/How-to-use-function-invocation-result-in-string-without-white-space-td4633263.html
http://boost.2283326.n4.nabble.com/How-to-use-function-invocation-result-in-string-without-white-space-td4633263.html
).

Do you have any suggestions? Thank you!

--
View this message in context: http://boost.2283326.n4.nabble.com/Usage-of-complex-expressions-in-regular-if-statements-apart-from-string-literals-tp4633270.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