Boost logo

Boost-Build :

Subject: Re: [Boost-build] make more than one target with one custom command
From: Roman Matsybora (matsic_at_[hidden])
Date: 2015-09-29 08:47:42


('binary' encoding is not supported, stored as-is) If I understand in this case one action will be called 2 times. But in my case there only one invocation for both. Also generated files may have dependencies from some source files that are used during generating. If some of dependencies changed, files have to be regenerated.
--- Исходное сообщение ---
От кого: "Vladimir Prus" <vladimir.prus_at_[hidden]>
Дата: 29 сентября 2015, 15:16:56

On 29-Sep-15 2:46 PM, Roman Matsybora wrote:
> This example invokes 2 actions for 2 targets
> What if 1 action makes 2 targets?

In that case, create 1 action object, and create 2 targets, passing the same action object to both, something like:

        local a = [ new action $(sources[1])
                   : common.copy : $(property-set) ] ;
         local t = [ new file-target $(name) : CPP : $(project)
                   : $(a) ] ;
         local t2 = [ new file-target $(name)_server : CPP : $(project)
                       : $(a) ] ;
         return [ virtual-target.register $(t) ] [ virtual-target.register $(t2) ] ;

Just replace 'common.copy' with something that actually produces two outputs.

- Volodya

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

('binary' encoding is not supported, stored as-is)



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