Boost logo

Boost-Build :

Subject: Re: [Boost-build] generator: 1-n targets
From: Anatoly Shirokov (shirokov_a_at_[hidden])
Date: 2009-10-06 07:20:31


Ops, I have missed it.

You can specify the 5-th parameter (it is output directory) of the
file-target command:

     rule run ( project name ? : property-set : sources * )
     {
         if ! $(sources[2])
         {
             local t = [ $(sources[1]).type ] ;
             local n = [ $(sources[1]).name ] ;
             if $(t) = CLS
             {
                local w = [ os.environ WRAPPER_DIR ] ;
                n = $(n:B) ;

                 local a = [ new action $(sources[1]) : wrapper.gensrc :
$(property-set) ] ;

                 local t1 = [ new file-target $(n) : CPP : $(project) :
$(a) : $(w) ] ;
                 local t2 = [ new file-target $(n) : H : $(project) :
$(a) : $(w) ] ;

                 return [ virtual-target.register $(t1) ]
                        [ virtual-target.register $(t2) ] ;

             }
         }
     }

BR,
Anatoly.

Thomas Lehmann :
> Thanks, for the generator example. Is working great!
> One answer is missing:
>
> How can I install the headers to another path?
> I can not do something like this:
>
> install headers
> : [ glob-tree ../Binaries/$(HOSTNAME)/Generators/*.h ]
> : <location>Binaries/$(HOSTNAME)/includes
> ;
>
> The glob-tree does not handle parent paths...
> How can I run the issue?
>
> sincerely
> Thomas
>
>> In the attachment there is a example which produces 5 output files.
>>
>> BR,
>> Anatoly.
>>
>> Thomas Lehmann:
>>
>>> Hi!
>>>
>>> having a dummy.template, how can I implement best
>>> to get a
>>>
>>> - dummy.h
>>> - dummy_manager.h
>>> - dummy_manager.cxx
>>>
>>> I have seen the 1-to-1 generator example and this is
>>> working well for me but I need three output files
>>> with different names. My python script can do it easily
>>> by the given input "dummy.template" but how can I make
>>> boost recogize the dummy_manager.cxx?
>>>
>>> How can I place those headers in another location than
>>> the manager?
>>>
>>> sincerely
>>> Thomas
>>>
>>> _______________________________________________
>>> 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