if (dep_status != 0)
{
- set_command_state (file, cs_finished);
file->update_status = dep_status;
- file->updated = 1;
+ notice_finished_file (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;
}
register struct file *file;
{
struct dep *d;
+ int ran = file->command_state == cs_running;
file->command_state = cs_finished;
file->updated = 1;
}
}
- if (!file->phony)
+ if (ran && !file->phony)
{
struct file *f;
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