Boost logo

Boost-Build :

From: Matthew Herrmann (matthew.herrmann_at_[hidden])
Date: 2006-05-21 21:38:42


On Friday 19 May 2006 09:01, you wrote:
> > Is there such a means available? Or a "right way?" to achieve this that
> > I've missed?
>
> This would be possible by writing module 'utilities.jam' that would define
> a target with a custom generator to build it, which generator will respond
> to the <version> feature and produce different usage requirements.
> ...
> If you're really going to implement this for your project, we can discuss
> the approach in more details.

Hi Volodya,

That would be great. I saw the following code on the list recently, and
realized that it solved essentially the same problem as mine. However,
copying it verbatim into a Jamfile gave me syntax errors after the first ].
It wasn't fixed by changing "run" to "lib" (to avoid test-case dependency).
I'm using BBv2.

--------

rule range-test ( name : includes * )
{
     return [
         run $(name).cpp
         <lib>../../test/build/boost_unit_test_framework
         <lib>../../regex/build/boost_regex
         :
         :
         : <include>$(BOOST_ROOT)
           $(includes)
         ] ;
}

test-suite range :
     [ range-test array ]
  ;

--------

I imagine something analogous, along these lines:

rule library ( name : version )
{
    return [
        alias $(name)-$(version)
        : : : : <cxxflags>-l$(name)-$(version) ;
}

But I am stumped on the syntax errors. The syntax of the original post (e.g.
<lib>) looks suspiciously v1, now that I think about it.

Thanks for your help,

Matthew

-- 
Matthew Herrmann
matthew.herrmann_at_[hidden]
Vice President, Software Architecture
Zomojo Pty Ltd

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