Boost logo

Boost-Build :

Subject: Re: [Boost-build] Automatic version number or build-id
From: Ryan Gonzalez (rymg19_at_[hidden])
Date: 2015-09-23 19:31:23

On September 23, 2015 6:21:03 PM CDT, Niklas Angare <li51ckf02_at_[hidden]> wrote:
>"Paulo Márcio Figueiredo Alves" <pauloalves1986_at_[hidden]> wrote:
>> On Sat, Sep 19, 2015 at 10:17 AM Niklas Angare
>> wrote:
>>> I'm trying to get Boost.Build to generate a source file at build
>>> containing an automatically generated version number or build-id.
>> make BuildTime2.cpp : : @buildtimecpp : <dependency>$(myfiles) ;
>> exe MyExe : $(myfiles) BuildTime2.cpp ;
>Thanks for the tip. However, it seems a little brittle. If at any point
>the future someone adds dependencies to MyExe without adding them to
>$(myfiles), the build-id won't always be updated when the exe is. I
>put a comment by the exe rule in the jam file, but this may not stop
>adding <library>somelib to the requirements of the project at the other
>of the long Jamfile.
>Any further suggestions?

At the risk of stating the obvious:

srcs = BuildTime2.cpp ;
make $(srcs) : : @buildtimecpp : <dependency>$(myfiles) ;
>> exe MyExe : $(myfiles) $(srcs) ;

>Niklas Angare
>Unsubscribe & other changes:

Sent from my Nexus 5 with K-9 Mail. Please excuse my brevity.

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