Boost logo

Boost-Build :

Subject: Re: [Boost-build] [python-port] msvc link and manifest issues
From: Vladimir Prus (ghost_at_[hidden])
Date: 2011-11-23 02:37:21

On 22/11/11 15:56, Juraj Ivančić wrote:
> Hi all,
> I found another issue in msvc.jam which is not directly portable to python port. The following rule
> rule link ( targets + : sources * : properties * )
> {
> if <embed-manifest>on in $(properties)
> {
> msvc.manifest $(targets) : $(sources) : $(properties) ;
> }
> }
> Will result in and msvc.manifest action respectively. Python port currently has (AFAICS)
> no way to conditionally chain an action from another action. As this problem is somewhat similar to
> the one from my previous post I came up with a proposed solution. Basically - allow the action to
> register additional Python function, which will be invoked after main update action is set.
> So the above translates to:
> <code>
> def manifest(targets,sources,properties):
> if 'on' in properties.get('<embed-manifest>'):
> engine.set_update_action('msvc.manifest', targets,
> sources, properties)
> # Does not work, as msvc.manifest action occurs before
> #engine.register_action('', command, function=manifest)

I suppose we can remain closer to Jam semantics of actions by switching the
order of calling 'function' and calling"set-update-action")
inside BjamAction.__call__. What do you think about this approach?

I feel that ultimately, we need to change the interface with build engine,
in particular if would be create if we could define Python code to produce
target directly (e.g. just by printing some content into file). However, this
is surely some time in future, so maybe making current semantics as close to
Jam semantics as possible is reasonable.


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at