diff options
author | Roland McGrath <roland@redhat.com> | 1994-09-29 04:14:20 +0000 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 1994-09-29 04:14:20 +0000 |
commit | 9807a2869f1b74d4b9561f25729f3cf7ff16f4a0 (patch) | |
tree | 8a656477a62072ff0b918ca369b219335006e32e /job.c | |
parent | e9521d344742418f743a26d3a68d5c47076ee7bf (diff) | |
download | gunmake-9807a2869f1b74d4b9561f25729f3cf7ff16f4a0.tar.gz |
(reap_children): Call delete_child_targets for non-signal error if
.DELETE_ON_ERROR is a target.
Diffstat (limited to 'job.c')
-rw-r--r-- | job.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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 |