Boost logo

Boost-Build :

Subject: Re: [Boost-build] calling an action
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2016-10-31 10:39:26


On 10/31/2016 06:53 AM, Stefan Seefeld wrote:
> trying to figure out whether I could use Python callables as actions in
> my Python frontend, I noticed that there was only a tiny bit of glue
> missing in the bjam Python interface to make this work:
> This seems to work fine, at least for the very simple cases I tried. I
> can now register both a command string (e.g. "c++ -o $(<) $(>)") as well
> as a Python function (def func(target, source) print('making...')) with
> my rule.
> If I wanted to make my Python action a wrapper that executes the
> previous command string, what would I need to do ? (I need to at least
> do the variable substitution to replace '$(<)' with the list of targets,
> etc., but I'm sure there is more...)

  Executing an action at this level just does
variable expansion. It returns the actual
command as a string. The variable to which the
result is written is not accessible from Python.

In Christ,
Steven Watanabe

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