From 7206715862b0175f86e0c81f3a9063af3936ded8 Mon Sep 17 00:00:00 2001 From: roland Date: Wed, 7 Sep 1994 07:06:46 +0000 Subject: [PATCH] (notice_finished_file): Only recheck modtimes if FILE->command_state was cs_running on entry (meaning the commands actually just ran). (update_file_1): Whenever we set FILE->update_status, call notice_finished_file instead of just set_command_state. --- remake.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/remake.c b/remake.c index 7ed6794..b9fe455 100644 --- a/remake.c +++ b/remake.c @@ -478,9 +478,8 @@ update_file_1 (file, depth) if (dep_status != 0) { - set_command_state (file, cs_finished); file->update_status = dep_status; - file->updated = 1; + notice_finished_file (file); depth--; @@ -549,9 +548,8 @@ update_file_1 (file, depth) if (!must_make) { DEBUGPR ("No need to remake target `%s'.\n"); - set_command_state (file, cs_finished); file->update_status = 0; - file->updated = 1; + notice_finished_file (file); return 0; } @@ -596,6 +594,7 @@ notice_finished_file (file) register struct file *file; { struct dep *d; + int ran = file->command_state == cs_running; file->command_state = cs_finished; file->updated = 1; @@ -629,7 +628,7 @@ notice_finished_file (file) } } - if (!file->phony) + if (ran && !file->phony) { struct file *f; @@ -656,7 +655,7 @@ notice_finished_file (file) d->file->updated = 1; d->file->update_status = file->update_status; - if (!d->file->phony) + if (ran && !d->file->phony) /* Fetch the new modification time. We do this instead of just invalidating the cached time so that a vpath_search can happen. Otherwise, it would -- 2.11.4.GIT