summaryrefslogtreecommitdiff
path: root/usr.bin/make/make.c
diff options
context:
space:
mode:
authorrillig <rillig@NetBSD.org>2020-11-24 22:45:24 +0000
committerrillig <rillig@NetBSD.org>2020-11-24 22:45:24 +0000
commitd4b9b87b6bc3cb96dbddde24a2608957806bd596 (patch)
treec7595f37afa662c670bc9f2c0c5bcd648afedc02 /usr.bin/make/make.c
parentec4f2f9f97710baabeef1dd4b641684045c04fa1 (diff)
make(1): inline Lst_ForEachUntil in MakeStartJobs
Diffstat (limited to 'usr.bin/make/make.c')
-rw-r--r--usr.bin/make/make.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/usr.bin/make/make.c b/usr.bin/make/make.c
index c898a7c0d3c..5cf373e25f2 100644
--- a/usr.bin/make/make.c
+++ b/usr.bin/make/make.c
@@ -1,4 +1,4 @@
-/* $NetBSD: make.c,v 1.212 2020/11/24 22:32:18 rillig Exp $ */
+/* $NetBSD: make.c,v 1.213 2020/11/24 22:45:24 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.212 2020/11/24 22:32:18 rillig Exp $");
+MAKE_RCSID("$NetBSD: make.c,v 1.213 2020/11/24 22:45:24 rillig Exp $");
/* Sequence # to detect recursion. */
static unsigned int checked_seqno = 1;
@@ -945,7 +945,16 @@ MakeStartJobs(void)
* just before the current first element.
*/
gn->made = DEFERRED;
- Lst_ForEachUntil(gn->children, MakeBuildChild, toBeMade->first);
+
+ {
+ GNodeListNode *firstToBeMade = toBeMade->first;
+ GNodeListNode *ln;
+
+ for (ln = gn->children->first; ln != NULL; ln = ln->next)
+ if (MakeBuildChild(ln->datum, firstToBeMade) != 0)
+ break;
+ }
+
/* and drop this node on the floor */
DEBUG2(MAKE, "dropped %s%s\n", gn->name, gn->cohort_num);
continue;