Boost logo

Boost-Build :

From: david x callaway (dxc_at_[hidden])
Date: 2006-12-20 13:59:18


I'm using
     Boost.Build V2 (Milestone 11)
     Boost.Jam 03.1.13
on linux, fc6, gcc 4.1.1, 32bit intel.

install works for a single target, i.e. this builds in bin/gcc/...
and installs the binary in the appropriate bin.

------ snip ---------
install dist : hello :
       <variant>release:<location>$(OUTDIR)/release/bin
       <variant>debug:<location>$(OUTDIR)/debug/bin ;

exe hello : hello.cpp ;
------ snip ---------

how to do for something that builds multiple targets? I have a main
rule to build .res files from .txt using genrb (the icu resource compiler).

in res.jam:

------ snip ---------
type.register RES : res ;
type.register TXT : txt ;

generators.register-standard res.resource : TXT : RES ;

actions resource
{
     genrb "-d$(<:D)" "$(>)"
}
------ snip ---------

in Jamroot:
------ snip ---------
import res ;

rule genrb ( sources + : requirements * )
{
     for local r in $(sources)
     {
         res $(r:B) : $(r) ;
     }
}
------ snip ---------

now in the resource file source directory the Jamfile is simple:

genrb [ glob *.txt ] ; # this is the only line in it

this compiles the resources, one for each *.txt file, into
./bin/gcc/debug, ./bin/gcc/release, etc.

I would like to be able to do something like
install dist : magic :
       <variant>release:<location>$(OUTDIR)/release/res
       <variant>debug:<location>$(OUTDIR)/debug/res
       ;

where, obviously, magic will not work. I *could* just list all the .txt
files individually and build and install them one by one using the "res"
rule and a corresponding install rule, but that's painful.

would it be possible to make the genrb rule return a list of the install
locations somehow and (somehow) use that to do the installs? or I could
loop over the *.txt files and call res and install inside the loop, but
again makes an ugly Jamfile that ends up cut/paste in every res directory.

what I'd like is something that concentrates the complex stuff in one or
two files and is simple to use in the individual Jamfiles (as the genrb
rule is already...but it doesn't do enough).

any suggestions?

thx
dxc


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