|
Boost-Build : |
From: Sohail Somani (s.somani_at_[hidden])
Date: 2006-06-23 18:00:35
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_at_[hidden] on behalf of Ilya Sokolov
Sent: Thu 6/22/2006 11:38 PM
To: boost-build_at_[hidden]
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
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