summaryrefslogtreecommitdiff
path: root/remake.c
diff options
context:
space:
mode:
Diffstat (limited to 'remake.c')
-rw-r--r--remake.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/remake.c b/remake.c
index 0795af3..3500535 100644
--- a/remake.c
+++ b/remake.c
@@ -530,7 +530,10 @@ update_file_1 (struct file *file, unsigned int depth)
break;
if (!running)
- d->changed = file_mtime (d->file) != mtime;
+ /* The prereq is considered changed if the timestamp has changed while
+ it was built, OR it doesn't exist. */
+ d->changed = ((file_mtime (d->file) != mtime)
+ || (mtime == NONEXISTENT_MTIME));
lastd = d;
d = d->next;