Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make make(1): extract MakeChildren from MakeStartJobs
details: https://anonhg.NetBSD.org/src/rev/d0e4294abd0b
branches: trunk
changeset: 947538:d0e4294abd0b
user: rillig <rillig%NetBSD.org@localhost>
date: Tue Dec 15 19:47:02 2020 +0000
description:
make(1): extract MakeChildren from MakeStartJobs
diffstat:
usr.bin/make/make.c | 24 ++++++++++++++----------
1 files changed, 14 insertions(+), 10 deletions(-)
diffs (52 lines):
diff -r c1744cdd9571 -r d0e4294abd0b usr.bin/make/make.c
--- a/usr.bin/make/make.c Tue Dec 15 16:30:55 2020 +0000
+++ b/usr.bin/make/make.c Tue Dec 15 19:47:02 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: make.c,v 1.227 2020/12/06 18:13:17 rillig Exp $ */
+/* $NetBSD: make.c,v 1.228 2020/12/15 19:47:02 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -102,7 +102,7 @@
#include "job.h"
/* "@(#)make.c 8.1 (Berkeley) 6/6/93" */
-MAKE_RCSID("$NetBSD: make.c,v 1.227 2020/12/06 18:13:17 rillig Exp $");
+MAKE_RCSID("$NetBSD: make.c,v 1.228 2020/12/15 19:47:02 rillig Exp $");
/* Sequence # to detect recursion. */
static unsigned int checked_seqno = 1;
@@ -917,6 +917,17 @@
return 0;
}
+static void
+MakeChildren(GNode *gn)
+{
+ GNodeListNode *toBeMadeNext = toBeMade.first;
+ GNodeListNode *ln;
+
+ for (ln = gn->children.first; ln != NULL; ln = ln->next)
+ if (MakeBuildChild(ln->datum, toBeMadeNext) != 0)
+ break;
+}
+
/* Start as many jobs as possible, taking them from the toBeMade queue.
*
* If the -q option was given, no job will be started,
@@ -960,14 +971,7 @@
*/
gn->made = DEFERRED;
- {
- GNodeListNode *toBeMadeNext = toBeMade.first;
- GNodeListNode *ln;
-
- for (ln = gn->children.first; ln != NULL; ln = ln->next)
- if (MakeBuildChild(ln->datum, toBeMadeNext) != 0)
- break;
- }
+ MakeChildren(gn);
/* and drop this node on the floor */
DEBUG2(MAKE, "dropped %s%s\n", gn->name, gn->cohort_num);
Home |
Main Index |
Thread Index |
Old Index