mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2025-01-31 00:53:23 +00:00
Wed Feb 28 03:56:20 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* remake.c (f_mtime): Check for future timestamps; give error and mark file as "failed to update".
This commit is contained in:
parent
5958f28900
commit
b07e961db1
1 changed files with 22 additions and 1 deletions
23
remake.c
23
remake.c
|
@ -1,5 +1,5 @@
|
||||||
/* Basic dependency engine for GNU Make.
|
/* Basic dependency engine for GNU Make.
|
||||||
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 1995 Free Software Foundation, Inc.
|
Copyright (C) 1988,89,90,91,92,93,94,95,96 Free Software Foundation, Inc.
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify
|
||||||
|
@ -988,6 +988,27 @@ f_mtime (file, search)
|
||||||
file = file->prev;
|
file = file->prev;
|
||||||
} while (file != 0);
|
} while (file != 0);
|
||||||
|
|
||||||
|
{
|
||||||
|
/* Files can have bogus timestamps that nothing newly made will be
|
||||||
|
"newer" than. Updating their dependents could just result in loops.
|
||||||
|
So notify the user of the anomaly by treating future files as
|
||||||
|
unrecoverably absent. */
|
||||||
|
|
||||||
|
static time_t now;
|
||||||
|
if (mtime > now && ! file->updated)
|
||||||
|
{
|
||||||
|
/* This file's time appears to be in the future.
|
||||||
|
Update our concept of the present, and compare again. */
|
||||||
|
extern time_t time ();
|
||||||
|
if (mtime > time (&now))
|
||||||
|
{
|
||||||
|
error ("*** File `%s' has modification time in the future",
|
||||||
|
file->name);
|
||||||
|
file->update_status = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return mtime;
|
return mtime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue