mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2024-12-28 15:58:07 +00:00
Formerly remake.c.~37~
This commit is contained in:
parent
04b7426dfa
commit
815ee70d7d
1 changed files with 21 additions and 29 deletions
28
remake.c
28
remake.c
|
@ -195,26 +195,11 @@ update_file (file, depth)
|
||||||
|
|
||||||
for (f = file; f != 0; f = f->prev)
|
for (f = file; f != 0; f = f->prev)
|
||||||
{
|
{
|
||||||
register struct dep *d;
|
|
||||||
int not_started = f->command_state == cs_not_started;
|
int not_started = f->command_state == cs_not_started;
|
||||||
|
|
||||||
status |= update_file_1 (f, depth);
|
status |= update_file_1 (f, depth);
|
||||||
check_renamed (f);
|
check_renamed (f);
|
||||||
|
|
||||||
for (d = f->also_make; d != 0; d = d->next)
|
|
||||||
{
|
|
||||||
check_renamed (d->file);
|
|
||||||
d->file->command_state = f->command_state;
|
|
||||||
d->file->update_status = f->update_status;
|
|
||||||
d->file->updated = f->updated;
|
|
||||||
if (debug_flag)
|
|
||||||
{
|
|
||||||
print_spaces (depth);
|
|
||||||
printf ("File `%s' was also made by making `%s'.\n",
|
|
||||||
d->file->name, f->name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (status != 0 && !keep_going_flag)
|
if (status != 0 && !keep_going_flag)
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
|
@ -552,8 +537,9 @@ update_file_1 (file, depth)
|
||||||
return file->update_status;
|
return file->update_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set FILE's `updated' flag and re-check its mtime and the mtime's
|
/* Set FILE's `updated' flag and re-check its mtime and the mtime's of all
|
||||||
of all files listed in its `also_make' member. */
|
files listed in its `also_make' member. Under -t, this function also
|
||||||
|
touches FILE. */
|
||||||
|
|
||||||
void
|
void
|
||||||
notice_finished_file (file)
|
notice_finished_file (file)
|
||||||
|
@ -604,6 +590,11 @@ notice_finished_file (file)
|
||||||
file->last_mtime = 0;
|
file->last_mtime = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (file->update_status != -1)
|
||||||
|
/* We actually tried to update FILE, which has
|
||||||
|
updated its also_make's as well (if it worked).
|
||||||
|
If it didn't work, it wouldn't work again for them.
|
||||||
|
So mark them as updated with the same status. */
|
||||||
for (d = file->also_make; d != 0; d = d->next)
|
for (d = file->also_make; d != 0; d = d->next)
|
||||||
{
|
{
|
||||||
d->file->command_state = cs_finished;
|
d->file->command_state = cs_finished;
|
||||||
|
@ -615,7 +606,7 @@ notice_finished_file (file)
|
||||||
We do this instead of just invalidating the cached time
|
We do this instead of just invalidating the cached time
|
||||||
so that a vpath_search can happen. Otherwise, it would
|
so that a vpath_search can happen. Otherwise, it would
|
||||||
never be done because the target is already updated. */
|
never be done because the target is already updated. */
|
||||||
(void) file_mtime (d->file);
|
(void) f_mtime (d->file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -792,6 +783,7 @@ remake_file (file)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* This does the touching under -t. */
|
||||||
notice_finished_file (file);
|
notice_finished_file (file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue