Boost logo

Boost-Build :

Subject: Re: [Boost-build] Timestamp
From: Nogradi, Chris (Chris.Nogradi_at_[hidden])
Date: 2012-05-14 10:31:32


> 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?

Thanks,

Chris

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient. If you are not the intended recipient, please be aware that any disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. If you have received this e-mail in error, please contact the sender and delete all copies.

Thank you for your cooperation.


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