Boost logo

Boost-Build :

Subject: Re: [Boost-build] Using variable modifiers problem
From: Edward Diener (eldiener_at_[hidden])
Date: 2017-02-20 02:02:08

On 2/19/2017 1:49 PM, Steven Watanabe via Boost-build wrote:
> On 02/19/2017 11:40 AM, Edward Diener via Boost-build wrote:
>> I seem to be missing some aspect of variable modifiers. In
>> it gives tells me that variable modifiers must be in the form of $(vm),
>> where v is the variable name and m is the modifier. Yet in feature.jam I
>> see this code:
>> rule values ( feature )
>> {
>> return $($(:E=:G=$(feature)).values) ;
>> }
>> and I do not understand how it can be syntactically correct since the :E
>> does not follow a variable name AFAICS. Clearly I am missing how such an
>> expression is being parsed.
> The variable name in this case is the empty string.
>> This is not a vain inquiry. I am trying to determine why some code is
>> failing when a call to feature.values with a particular parameter is
>> returning an empty result, but I cannot do so unless I understand what
>> is happening in the above jam code.
> The purpose of $(:E=:G=$(feature)) is to wrap $(feature)
> with <>.

There used to be an obscure C programming contest in DDJ. I think
obscure jam code outdoes any obscure C code easily, but thanks for the
explanation, and I was finally able to solve my particular problem. But
if you will help me further in understanding some more syntax related to
the rule above I would highly appreciate it. Let us say I pass:


to the feature.values rule. This then resolves to:

return $(<toolset-msvc:version>.values)

What is '<toolset-msvc:version>.values' and how does that get resolved ?
I know my questions seem easy to someone who understands what is
happening in jam code, but although I think I understand the language I
am still baffled by its use and trying to figure out what it is doing. I
would assume that '<toolset-msvc:version>.values' would be the name of
some variable, but I cannot find any such variable name in the Boost
Build jam files.

> In Christ,
> Steven Watanabe

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