Brian J. Murrell wrote:

> I have a file which is not created by make but is created/updated by an
> outside process.  The time stamp on this file will always be some time
> in the past.  Let's call this file "O".

OK, so "O" is just like a normal source file; it is not created by make,
and it is created/updated by your text editor.

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

This paragraph does not make sense (to me).

At some point, "O" is modified (possibly several times).
Suppose the "O" was last modified at T1.
Then you call make, which builds "T" at T2.
Obviously T1 < T2
If "O" is modified (possibly several times) at T3,
then "O" is obviously newer than "T" since T2 < T3.

When T is built, it is (by design) newer than its prerequisites.

"T rebuilt if file O is newer than it was the last time T was built"
is the natural "make" behavior.
"O" cannot change after "T" is built AND "still not be newer than T".

> Somehow I need to introduce some kind of time tracking mechanism on O
> which triggers a dependency on T, perhaps through a "stamp" file of some
> sort but I'm not quite getting my head around it.

What am I missing?

T : O
  echo FOO > T

-- 
Regards.


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

Reply via email to