Boost logo

Boost-Build :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-01-12 21:53:43


Well, I don't think I ever specified how that should work. I think it should
enter the module's namespace followed by the target's, don't you?

In general you should try to only use "on" variables in actions, though, so
maybe for the time being it would be better to attach the test-names to the
list target:

rule list ( target )
{
test-names on $(target) = $(test-names) ;
}

----- Original Message -----
From: "Brad King" <brad.king_at_[hidden]>
To: <jamboost_at_[hidden]>
Sent: Saturday, January 12, 2002 8:24 PM
Subject: [jamboost] Re: Testing Jamfile model

> Dave,
>
> > Try this approach instead:
> > module local test-names ;
> > rule compile ( name : sources + : requirements * )
> > {
> > test-names += $(name) ;
> > module local $(name).sources = $(sources) ;
> > module local $(name).requirements = $(requirements) ;
> > }
> >
> > actions quietly list
> > {
> > echo $(test-names) ;
> > }
> >
> > rule sources ( target ) { return $(target).sources ; }
> > rule requirements ( target ) { return $(target).requirements ; }
> I had tried something similar, but it seems that the module-local
> variables are not found from actions, only from rules. When I run that
> code, I get a blank line printed out by the list action. If I make
> test-names a non-local, it works fine. Is this a bug in Jam, or is the
> code incorrect?
>
> -Brad
>
>
>
> To unsubscribe from this group, send an email to:
> jamboost-unsubscribe_at_[hidden]
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>

 


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