On 12-11-30 12:29 PM, Britton Kerin wrote:
> On Thu, Nov 29, 2012 at 8:50 AM, Brian J. Murrell <[email protected]> 
> wrote:
>>
>> I have a target which I want make to build which we'll call "T".  I want
>> T rebuilt if file O is newer than it was the last time T was built.  But
>> even though the time on O might be newer than it was the last time T was
>> built, it will still not be newer than T.

> I think this will do what you want:
> 
> O_update_stamp: O
>         touch $@
> 
> T: O_update_stamp
>         @echo Time to rebuild T...
>         touch $@
> 
> clean:
>         rm -f O_update_stamp T

I don't think it will.  It doesn't address the condition I left quoted
above, from my original e-mail.

To clarify, at some point, O will be updated and have a newer time stamp
that it used to have but that newer time stamp can still be older than
the last time O_update_stamp was touched.

Use-case:

- O is six months old and T doesn't exist
- "make T"
  - O_update_stamp == now
  - T is built
- the next day, O is updated and has a time stamp that is 3 months old
- make T
  - nothing happens
  - but T should be rebuilt since O is newer than it was the last time
    T was built

I do appreciate your thought on this though.

Cheers,
b.

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Help-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to