Subject: Re: [Boost-build] forcing regeneration of intermediate files
From: Vladimir Prus (vladimir.prus_at_[hidden])
Date: 2016-03-09 04:58:11
On 09-Mar-16 12:09 PM, renaud lepere wrote:
> Le 09/03/2016 08:15, Vladimir Prus a écrit :
>> the best way we have now is documented at:
>> See my last post at the bottom of the page - could you give that a try?
> Thanks a lot, it put me on a good direction (I hope so). I did something similar and simpler but it seems to work :
> exe hello : hello.cpp hello2.cpp build-id.cpp ;
> make build-id.cpp : : @generate-build-id ;
> actions generate-build-id
> python version.py > $(<)
> explicit build-id.cpp ;
> always build-id.cpp ;
> The version control and other stuff (__DATE__ macros) are all in version.py and build-id.cpp is always regenerated.
The complexity of the previous solution was to only regenerate build-id when the executable itself has to be updated
due to changes in other sources.
The code you have above will work, too, but will cause 'hello' to be always relinked - if that's fine with you, then
-- Vladimir Prus http://vladimirprus.com
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