Boost logo

Boost-Build :

Subject: [Boost-build] calling an action
From: Stefan Seefeld (stefan_at_[hidden])
Date: 2016-10-31 08:53:56


Hi,

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:
https://github.com/stefanseefeld/boost.build/commit/f9170f47406d0d587b8966ce5b5f30878e96a496

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...)

Thanks,

        Stefan

-- 
      ...ich hab' noch einen Koffer in Berlin...

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