[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: using the date relationship of two older files as a prerequisit
From: |
Brian J. Murrell |
Subject: |
Re: using the date relationship of two older files as a prerequisit |
Date: |
Fri, 30 Nov 2012 12:42:26 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
On 12-11-30 12:29 PM, Britton Kerin wrote:
> On Thu, Nov 29, 2012 at 8:50 AM, Brian J. Murrell <address@hidden> 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.
signature.asc
Description: OpenPGP digital signature