Boost logo

Boost-Build :

Subject: [Boost-build] [python-port] msvc link and manifest issues
From: Juraj Ivanèiæ (juraj.ivancic_at_[hidden])
Date: 2011-11-22 06:56:53

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:

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)

# Works
engine.register_action('', command, chain_function=manifest)

This is hardly elegant, but I don't see a better solution.
Anyone have a better idea?

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