Boost logo

Boost-Build :

Subject: Re: [Boost-build] prototyping alternative Boost.Build syntax
From: Vladimir Prus (vladimir.prus_at_[hidden])
Date: 2016-10-28 09:24:46


On 28-Oct-16 4:12 PM, Stefan Seefeld wrote:

(I'd like to prototype a bit with a new (Python)
> syntax, and therefore need to hook up my own parser to feed b2 the
> objects it expects.

If you're doing that, you should be working with Python port, and then,
things are much simpler. b2 is merely starting Python interpreter, and
starts Python code. It also gives Python a few functions to put together
a lowest-level dependency graph.

The code in Jamfiles is intepreted by b2, but it mostly calls Python
functions that that whatever they please. So,

    exe a : a.cpp ;

pretty directly calls this Python function:

which does:

      return self.manager_.targets().create_typed_target(
                 type, self.registry.current(), name, sources,
                 requirements, default_build, usage_requirements)

Native Python build description would have 'manager' variable injected
in scope, and do exactly the above :-)

Vladimir Prus

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