summaryrefslogtreecommitdiff
path: root/job.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1993-01-31 22:54:06 +0000
committerRoland McGrath <roland@redhat.com>1993-01-31 22:54:06 +0000
commitdfaa02a8d5e060b0a14a388e2759038f0a5c65fc (patch)
tree5653e8a037e21e1c2875a5f54d57b50343a66c9c /job.c
parent50d1798203f9d694b88c796b31e7acea20376e8b (diff)
downloadgunmake-dfaa02a8d5e060b0a14a388e2759038f0a5c65fc.tar.gz
Formerly job.c.~93~
Diffstat (limited to 'job.c')
-rw-r--r--job.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/job.c b/job.c
index 005de3c..181be5b 100644
--- a/job.c
+++ b/job.c
@@ -344,9 +344,6 @@ reap_children (block, err)
if (c->file->update_status != 0)
/* We failed to start the commands. */
delete_child_targets (c);
-
- /* Tell update_file that some actual work has been done. */
- ++files_remade;
break;
default:
@@ -502,6 +499,15 @@ start_job_command (child)
if (just_print_flag || (!noprint && !silent_flag))
puts (p);
+ /* Tell update_goal_chain that a command has been started on behalf of
+ this target. It is important that this happens here and not in
+ reap_children (where we used to do it), because reap_children might be
+ reaping children from a different target. We want this increment to
+ guaranteedly indicate that a command was started for the dependency
+ chain (i.e., update_file recursion chain) we are processing. */
+
+ ++commands_started;
+
/* If -n was given, recurse to get the next line in the sequence. */
if (just_print_flag && !recursive)
@@ -510,11 +516,6 @@ start_job_command (child)
free ((char *) argv);
if (job_next_command (child))
start_job_command (child);
- else
- /* Normally, this is set by reap_children to indicate that
- some commands were actually run. Under -n, reap_children
- never gets called, so we increment it here. */
- ++files_remade;
return;
}