Boost logo

Boost-Build :

Subject: Re: [Boost-build] prototyping alternative Boost.Build syntax
From: Vladimir Prus (vladimir.prus_at_[hidden])
Date: 2016-10-29 15:39:39


Stefan,

> 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")
> #return b2.build_system.main()
>
> (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).

Try adding two further lines:

     bjam_interface.call("UPDATE_NOW", "hello.o")
     bjam_interface.call("UPDATE")

-- 
Vladimir Prus
https://vladimirprus.com

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