From: Malcolm Cifuentes (malcolm_cifuentes_at_[hidden])
Date: 2005-05-26 09:06:15
Vladimir Prus <ghost_at_[hidden]> wrote in
> On Thursday 26 May 2005 12:22, Malcolm Cifuentes wrote:
>> Hi All,
>> if I echo $(var) and receive this:
>> I think it means I have 3 x file-target objects, is this correct?
> It means there three instances of file-target class were created, and
> your var is the name of the third instance.
ok that helps, so what is the purpose of @<N> in the echo?
>> Is there any way I can iterate over each element/object?
> Element of what? What are you trying to accomplish?
I should not have introduced the term element, I meant object.
Given the list contains 1 tis easy to iterate over:)
>> I have tried a 'for in loop' which doesn't appear to work.
>> for local t in $(var)
>> echo "hi" ;
>> I was hoping to see "hi" displayed times.
> $(var) is a name of a single instance -- it's basically a list of
> lenth 1.
>> given $(var).length returns 1 I am starting to think I've got it
> What's $(var).length ? I don't think file-target class has any method
> by that name.
Oops, my mistake I meant [ sequence.length $(var) ]
>> [ $(var).str ] iterates over all 3 but I'm clueless if I can
>> repeat how it does it.
> The 'str' of file-target method prints the sources of the target, if
> any, and does this with this code:
> local action = [ action ] ;
> if $(action)
> local sources = [ $(action).sources ] ;
> for local s in $(sources)
> If you want to iterate over source, that's how to do it. If you want
> something else, what's that? I don't understand why you'd want to
> iterate over all instances of file-target ever created.
> - Volodya
I am trying to form a better understanding of how bb v2 works so I can
customise it for my own needs. Currently I am trying to understand how
the install rule is held together by instrumenting the bazoo out of the
necessary jam files and trying to replicate a similar but simple example
for my own documentation.
hopefully when I understand a lot more I will be able to either extend
the install target to do what I want or roll my own.
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