|
Boost-Build : |
From: Jorge Suit Perez Ronda (josp_at_[hidden])
Date: 2006-07-04 03:49:53
Another similar way could be:
rule objects ( name : sources + )
{
local t_list = ;
for o in $(sources)
{
local t = $(o:B) ;
obj $(t) : $(o) ;
t_list += $(t) ;
}
alias $(name) : $(t_list) ;
}
and use like this:
objects pseudo_lib : [ glob src/*.cpp ] ;
best regards,
Jorge
On Thu, 2006-06-29 at 15:01 -0400, Chris Weed wrote:
> That looks like what I need.
> Thanks,
> Chris
>
> On 6/29/06, Phillip Seaver <phil_at_[hidden]> wrote:
> > Chris Weed wrote:
> > > Hi,
> > > I currently can do the following:
> > >
> > > obj object1 : src/file1.cpp ;
> > > obj object2 : src/file2.cpp ;
> > > obj object3 : src/file3.cpp ;
> > > alias objects : object1 object2 object3 ;
> > >
> > > I would like the same thing, but glob all of the files in the src
> > > directory w/o enumerating all of them.
> > > I would like something like this:
> > > obj all_objs : [ glob src/*.cpp ] ;
> > >
> > > However, the obj rule seems to only take one source file and create
> > > one object file.
> > > I don't see how I can generate multiple object files from a glob command.
> > > Chris
> > >
> > How about this?
> >
> > local srcs = [ glob ../adsizer/*.cpp ] ;
> > for local s in $(srcs) {
> > obj $(s:B) : $(s) ;
> > }
> > alias objects : $(srcs:B) ;
> >
> >
> > Phillip
> >
> > _______________________________________________
> > Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
> >
> _______________________________________________
> 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