Boost logo

Boost-Build :

Subject: Re: [Boost-build] prototyping alternative Boost.Build syntax
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2016-11-03 10:59:29


On 11/03/2016 08:38 AM, Stefan Seefeld wrote:
> On 29.10.2016 16:50, Steven Watanabe wrote:
>>> * can a target be something other than a file, perhaps with no
>>> filesystem representation at all ?
>> Yes. NOTFILE marks a target as not
>> referring to a real file.
> In what way does bjam/b2 handle NOTFILE targets differently from other
> targets ?

  NOTFILE targets are updated when their
dependencies are updated. b2 doesn't attempt
to bind them to a real file nor check
the timestamp.

> And what other target types (or attributes) exist ?
> How can I instantiate / declare targets using these non-default
> attributes using the bjam Python API (or the C API, if there isn't any
> Python binding for it yet) ?

>>> * The bjam.define_action() function takes a list and an int as third and
>>> fourth argument. What are these used for ?
>> The list is a list of variable names.
>> The variable names should be a list of
>> targets which will be translated from
>> the target name to the filesystem path.
>> Example:
>> actions link bind LIBRARIES {
>> g++ $(>) -o $(<) $(LIBRARIES)
>> }
>> LIBRARIES = <pbin>lib.a ;
>> SEARCH on <pbin>lib.a = ./bin ;
>> Then in the body of link, $(LIBRARIES) will
>> expand to ./bin/lib.a.
> Again, in the C (or Python) API, where are these variables defined so
> that they can be properly substituted if requested by the
> bjam.define_action() call ?

  on TARGET variables (such as SEARCH) can
be set using set-target-variable, defined
in kernel/bootstrap.jam.

In Christ,
Steven Watanabe

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