Boost logo

Boost-Build :

From: david x callaway (dxc_at_[hidden])
Date: 2006-12-20 15:30:42


yes! using your genrb rule below I can write, in the resource directory
Jamfile

reslist = [ genrb [ glob *.txt ] ] ;

install dist : $(reslist) :
       <variant>release:<location>$(OUTDIR)/release/res
       <variant>debug:<location>$(OUTDIR)/debug/res;

and the compiled resource files end up where I want them.

I tried something similar by simulating it manually, and it didn't work.
  I think the trick (after getting the rule to return the paths) is the
[ ] to make it into a list.

note I was pleasantly surprised to find that spaces in OUTDIR were not a
problem.

thanks!
dxc

Vladimir Prus wrote:
> On Wednesday 20 December 2006 21:59, david x callaway wrote:
>
>> rule genrb ( sources + : requirements * )
>> {
>> for local r in $(sources)
>> {
>> res $(r:B) : $(r) ;
>> }
>> }
>
>> 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 :
> ......
>> 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).
>
> It's 23:00 here so I might be talking rubbish, but I thin that:
>
> rule genrb ( sources + : requirements * )
> {
> local result ;
> for local r in $(sources)
> {
> res $(r:B) : $(r) ;
> result += $(r:B) ;
> }
> return $(result) ;
> }
>
> should work. The 'res' rule define main target named $(r:B), if you add
> the name of a main target to the sources list of 'install' that main target
> gets installed.
>
> - Volodya
> _______________________________________________
> 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