mirror of
https://git.savannah.gnu.org/git/make.git
synced 2025-01-13 01:07:36 +00:00
(reap_children): Call delete_child_targets for non-signal error if
.DELETE_ON_ERROR is a target.
This commit is contained in:
parent
e9521d3447
commit
9807a2869f
1 changed files with 7 additions and 1 deletions
8
job.c
8
job.c
|
@ -379,9 +379,15 @@ reap_children (block, err)
|
|||
{
|
||||
/* The commands failed. Write an error message,
|
||||
delete non-precious targets, and abort. */
|
||||
static int delete_on_error = -1;
|
||||
child_error (c->file->name, exit_code, exit_sig, coredump, 0);
|
||||
c->file->update_status = 1;
|
||||
if (exit_sig != 0)
|
||||
if (delete_on_error == -1)
|
||||
{
|
||||
struct file *f = lookup_file (".DELETE_ON_ERROR");
|
||||
delete_on_error = f != 0 && f->is_target;
|
||||
}
|
||||
if (exit_sig != 0 || delete_on_error)
|
||||
delete_child_targets (c);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue