Boost logo

Boost-Build :

Subject: Re: [Boost-build] prototyping alternative Boost.Build syntax
From: Stefan Seefeld (stefan_at_[hidden])
Date: 2016-10-29 17:29:11

On 29.10.2016 17:21, Steven Watanabe wrote:
> On 10/29/2016 03:09 PM, Stefan Seefeld wrote:
>> On 29.10.2016 16:50, Steven Watanabe wrote:
>>>> * 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)
>>> }
>> I see. So '>' and '<' are pre-defined variables ?
> Yes. They are handled in the same way as the
> bindlist.
>> Are there other
>> predefined variables beside those ?
> $(<) and $(>) are synonyms for $(1) and $(2).
> ($(n) is the nth argument of a rule up to 19.)
> Only these two variables get special handling
> in an action body and they are not treated
> specially in any other context.
>> (Where in the code does the expansion happen ?)
> I don't understand the question.

I was wondering where in the (C) code these variables are defined, and
where the expansion is implemented. (I was in particular wondering about
the modifiers such as ":D" that attribute special semantics to "<". Are
rule / action arguments always assumed to be strings ? Does the use of
"2:D" imply that the 2nd argument will be interpreted as a filename
whose directory name is to be taken ?


      ...ich hab' noch einen Koffer in Berlin...

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