Boost logo

Boost-Build :

From: Daniel Einspanjer (deinspanjer_at_[hidden])
Date: 2006-03-01 09:51:55


Hehe Yes they are. thanks for the pointer. I should have realized that was
the right way of doing it. I was just suckered in by all the examples I saw
of calling the [glob] rule in the source section of targets. ;)
Daniel

"Vladimir Prus" <ghost_at_[hidden]> wrote in message
news:200603011057.33931.ghost_at_cs.msu.su...
> On Wednesday 01 March 2006 02:22, Daniel Einspanjer wrote:
>> I'd like to be able to declare the sources of a target like this:
>>
>> rule get_extra_source ( properties )
>> {
>> local cust_name = [ $(properties).get <customer> ] ;
>> return [ glob fubar-$(cust_name).cpp ] ;
>> }
>> exe fubar
>>
>> : # sources
>>
>> foo.cpp
>> bar.cpp
>> [ get_extra_source ]
>> ;
>
> Just indirect conditional requirements together with the <source> feature:
>
> rule get_extra_source ( properties * )
> {
> local cust_name = [ feature.get-values <customer> : $(properties) ]
> ;
> local s = [ glob fubar-$(cust_name).cpp ] ;
> return <source>$(s) ;
> }
>
> exe foobar : foo.cpp : <conditional>@get_extra_source ;
>
> You can find a simpler example attached.
>
> Aren't indirect conditional requirements cool?
>
>
> HTH,
> Volodya
>
>
> *****************************************************************************
> **
> **
> ** WARNING: This email contains an attachment of a very suspicious type.
> **
> ** You are urged NOT to open this attachment unless you are absolutely
> **
> ** sure it is legitmate. Opening this attachment may cause irreparable
> **
> ** damage to your computer and your files. If you have any questions
> **
> ** about the validity of this message, PLEASE SEEK HELP BEFORE OPENING IT.
> **
> **
> **
> ** This warning was added by the IU Computer Science Dept. mail scanner.
> **
> *****************************************************************************
>
>

--------------------------------------------------------------------------------

> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost-build
>


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