Boost logo

Boost-Build :

Subject: Re: [Boost-build] String processing
From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2010-05-13 10:12:34


On 5/13/2010 12:28 AM, Anthony Foglia wrote:
> In our Jamfiles, we usually have a rule of the form:
>
> install all
> : OurExecutable
> : <variant>release:<location>Release
> <variant>debug:<location>Debug
> ;
>
> Now I'm adding another variant, "production", for what goes on our
> production machines. The problem is that then running "bjam production
> all" gives and error that all depends on itself. I can fix this by
> adding a <variant>production:<location>Production. But it seems the
> smarter trick is to replace the <variant>release:<location>Release
> requirements with a <conditional> rule.
>
> Is there any documentation of how to do string processing with boost
> build? All I see are parameter expansion modifier to convert text to all
> lower or all upper case. I need something to convert it a string to
> title case.

We don't have anything built in to convert to capitalization. So you
would have to do it by "hand". As Gevorg pointed out using the "string"
utility module would help, and you might want to also look at the
"regex" module. For such classes you can use the inline help system to
read docs on them, or just read the source code since the help system
gets the docs from the code. For lower level stuff like the $(:L) you
need to look at the Boost Jam docs. Particularly the variable expansion
sections
<http://www.boost.org/doc/tools/jam/jam/language.html#jam.language.variables>.

HTH

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org (msn) - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim,yahoo,skype,efnet,gmail

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