Boost logo

Boost-Build :

Subject: Re: [Boost-build] Timestamp
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2012-05-14 11:22:27


AMDG

On 05/14/2012 07:31 AM, Nogradi, Chris wrote:
>> On 03/30/2012 03:01 PM, Nogradi, Chris wrote:
>>> Suppose I want to rebuild a C file to update a time stamp in the
>> final exe but I only want to do this when the exe needs to be updated.
>> Any high level rules that allow me to do this? I saw a hack in 2007:
>>>
>>> http://thread.gmane.org/gmane.comp.lib.boost.build/16099/focus=16139
>>>
>>> but it does not seem to accomplish what I need.
>>>
>>
>> On Friday, March 30, 2012 8:31 PM, Steven Watanabe wrote:
>>
>> At the Jam level, I think REBUILDS does what
>> you want. I don't think there's a Boost.Build
>> interface for this though.
>
> I have studied the only usage instance of this I could find in testing.jam and since I am just trying to set this on an existing obj target, the example there does not seem relevant. I believe this is what I would need:
>
> obj timestamp : timestamp.c ;
> exe main : main.c timestamp ;
> rebuilds main : timestamp ;
>
> If this is correct, I would need to implement something similar to the always rule but with two parameters. Am I on the right path or is there a better solution for this?
>

That sounds right. The tricky part will
be getting the correct virtual targets for
timestamp when building main.

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