Subject: Re: [Boost-build] prototyping alternative Boost.Build syntax
From: Stefan Seefeld (stefan_at_[hidden])
Date: 2016-10-29 00:04:52
On 28.10.2016 13:11, Vladimir Prus wrote:
>> I'm not sure. I have yet to figure out what the right boundary is to
>> interface with the build engine.
>> So let's assume I want to try both:
>> * I want to prototype how to write metatargets in Python
> Then, you would need to:
> - Build b2 with Python support
> - Look at
> like 150, where it loads Jamfiles.
> - Modify that place and/or load_jamfile method to support loading Python
as reported, this leads to
error: unexpected exception
descriptor 'difference' requires a 'set' object but received a 'list'
at ".../boost.build/src/build/generators.py", line 598, in convert_to_consumable_types
>> * I want to prototype how to write targets (to eventually replace all of
>> the above Boost.Build logic by suitable Python code).
> so that the bootstrap function has:
> bjam_interface = __import__('bjam')
> bjam_interface.define_action("gcc.compile", "g++ -c -o $(<) $(>)")
> bjam_interface.set_update_action("gcc.compile", "a.o", "a.cpp")
> Then, you'd go from there.
I have done this:
bjam_interface = __import__('bjam')
bjam_interface.define_action("gcc.compile", "g++ -c -o $(<) $(>)", , 0)
bjam_interface.call("gcc.compile", "hello.o", "hello.cpp")
(I assume the invocation of 'b2.build_system.main()' is responsible for
locating Jamfiles and doing all the other stuff that I'd like to skip
when interfacing with the low-level API, yes ?)
This doesn't seem to do anything at all. At least it doesn't generate
"hello.o", and doesn't print any (error) message either. Is there any
command-line option I can use to cause the execution to be traced (I
tried "-d+2" and "--debug-building" with no visible effect).
-- ...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