|
Boost-Build : |
Subject: Re: [Boost-build] Using variable modifiers problem
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2017-02-20 02:44:42
AMDG
On 02/19/2017 07:02 PM, Edward Diener via Boost-build wrote:
> <snip>Let us say I pass:
>
> <toolset-msvc:version>
>
> to the feature.values rule. This then resolves to:
>
> return $(<toolset-msvc:version>.values)
>
Yep.
> 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.
>
It's set in feature.extend-feature:
$(feature).values += $(values) ;
In general
map.$(key) = value ;
...
result = $(map.$(key)) ;
is the idiomatic way to express a map in Jam.
In this case, feature.jam is using a postfix instead
of a prefix to identify the map, but it's essentially
the same.
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