Boost logo

Boost-Build :

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


On 29.10.2016 17:56, Steven Watanabe wrote:
> AMDG
>
> On 10/29/2016 03:29 PM, Stefan Seefeld wrote:
>> On 29.10.2016 17:21, Steven Watanabe wrote:
>>>> (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.
> Equivalence of $(<), $(>), $(1), and $(2) comes from here:
> https://github.com/boostorg/build/blob/develop/src/engine/function.c#L363
>
> Expansion of modifiers is somewhat complicated.
> They're parsed into this struct:
> https://github.com/boostorg/build/blob/develop/src/engine/function.c#L603
> and the top level function for processing them is here:
> https://github.com/boostorg/build/blob/develop/src/engine/function.c#L1065
> Most individual modifiers are applied here:
> https://github.com/boostorg/build/blob/develop/src/engine/function.c#L730
>
> Handling of the bindlist happens here:
> https://github.com/boostorg/build/blob/develop/src/engine/make1.c#L1315
>
> $(>) and $(<) are the arguments of the rule and
> are set up by make1list at:
> https://github.com/boostorg/build/blob/develop/src/engine/make1.c#L1265
>
>> (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 ?
> Yes. Every variable in Jam is always a list
> of strings. There is nothing else.
>
>> Does the use of
>> "2:D" imply that the 2nd argument will be interpreted as a filename
>> whose directory name is to be taken ?
>>
> Yes. These modifiers can always be used
> in any variable expansion. There's a list
> of modifiers here:
> http://www.boost.org/build/doc/html/jam/language.html#jam.language.variables.expansion

Great, thanks for all your assistance !

        Stefan

-- 
      ...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