Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2007-08-04 10:30:13

Larry Evans wrote:

> On 08/03/2007 01:23 PM, Larry Evans wrote:
> [snip]
>> * question 2
>> The following is from gcc.jam:
>> <-------- cut here ---------
>> actions link bind LIBRARIES
>> {
>> -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" $(START-GROUP)
>> #the above appears all on one line in my editor.
>> }
>> >-------- cut here ---------
>> What variable values are available in the actions body? Was the
>> 'bind LIBRARIES' needed because it wasn't among the set of
>> variables passed to all actions or just actions for link commands
>> or is there some other criteria for determining the variables
>> passed to the actions body?
> Part of the answer to this is, maybe, provided by:
> which contains:
> Then, the flags invocation says that whenever verbatin.inline-file
> action is run, the value of the verbatim-options feature will be added
> to the OPTIONS variable, and can be used inside the action body.
> all declared as features of the gcc toolset (or more precisely,
> the superclass of gcc, i.e. the unix toolset)?

A rule can use the following variables:

1. Variables globally set in the module an action is in.
2. A variable set "on target"

On Boost.Build, the "on target" variables to set are described via
the 'flags' rule. So, this line from gcc.jam:

        flags $(toolset).link RPATH_LINK $(condition) : <xdll-path> : unchecked ;

makes RPATH_LINK available in the 'link' action.

The 'bind' you was asking is somewhat different -- when a variable used in action
is a string, it can be just used. But when a variable is a name of jam's low-level
target, one has to use 'bind' to get the pathname inside the action, not the target's

Finally, I don't really remember if modifiers should be used before action name
or after -- using 'bind' after apparently works.

- Volodya

> _______________________________________________
> Unsubscribe & other changes:

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