|
Boost-Build : |
Subject: Re: [Boost-build] prototyping alternative Boost.Build syntax
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2016-10-29 16:10:37
AMDG
On 10/29/2016 01:45 PM, Stefan Seefeld wrote:
>
> Cool, that worked ! Can you outline what the four calls do ?
>
> bjam_interface.define_action("gcc.compile", "g++ -c -o $(<) $(>)",
> [], 0)
> bjam_interface.call("gcc.compile", "hello.o", "hello.cpp")
> bjam_interface.call("UPDATE_NOW", "hello.o")
> bjam_interface.call("UPDATE")
>
> from my guess:
>
> * the first line defines an action
Yes.
> * the second line defines a rule by which "hello.o" is made from
> "hello.cpp" using that action
Yes.
> * the third line requests "hello.o" to be remade ("now" - is that a
> blocking call ?)
Yes.
> * not sure about the fourth line
>
It clears the update list causing the default
update phase to do nothing.
There's actually one more component that's missing:
bjam_interface.call("DEPENDS", "hello.o", "hello.cpp");
gcc.compile doesn't automatically set up this
dependency. (The first time you build it will
update because hello.o is missing. However,
without DEPENDS, touching hello.cpp won't cause
hello.o to update.)
In Christ,
Steven Watanabe
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