This looks like it would work. I'm going to give it a shot next week when I'm back in the office.

By the way, is there a reference or tutorial for the entire bjam language? It seems very nice.

-----Original Message-----
From: boost-build-bounces@lists.boost.org on behalf of Ilya Sokolov
Sent: Thu 6/22/2006 11:38 PM
To: boost-build@lists.boost.org
Subject: Re: [Boost-build] Using inputs into targets

local a_cpp = [ glob a/*.cpp ] ;
for local i in $(a_cpp)
{
   # :B for basename, see "jam/language/variables"
   obj $(i:B) : $(i) ;
}
lib a : $(a_cpp:B) ;

local b_cpp = [ glob b/*.cpp ] ;
for local i in $(b_cpp)
{
   obj $(i:B) : $(i) ;
}
lib b : $(b_cpp:B) ;

local c_cpp = [ glob c/*.cpp ] ;
for local i in $(c_cpp)
{
   obj $(i:B) : $(i) ;
}
lib c : $(c_cpp:B) $(b_cpp:B) ;

lib all : $(a_cpp:B) $(b_cpp:B) $(c_cpp:B) ;

you can also move the loops to separate rule:

rule objs ( name
           : sources ? # maybe i wrong with this signs, see docs
           : requirements *
           : default-build ?
           : usage-requirements )
{
   for local i in $(sources)
   {
     obj $(i:B) : $(i) ;
   }
}

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