|
Boost-Build : |
Subject: Re: [Boost-build] Generating random number string in b2
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2016-10-10 14:47:54
AMDG
On 10/10/2016 12:24 PM, Edward Diener wrote:
> On 10/10/2016 11:38 AM, Steven Watanabe wrote:
>> <snip>
>> The usual method is to use a counter.
>> .target-id = 0 ;
>> rule get-next-id ( )
>> {
>> .target-id = [ CALC $(.target-id) + 1 ] ;
>> return $(.target-id) ;
>> }
>
> Thanks, Steve. Works beautifully. I had thought along these lines but
> did not know when and how often a variable such as .target-id gets
> initially set. I assume it gets set each time the jam file it is in gets
> "loaded", but I am not sure when this happens in the Boost Build system.
>
Every module is loaded once, the
first time it's needed.
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