summaryrefslogtreecommitdiff
path: root/usr.bin/make/make.c
diff options
context:
space:
mode:
authordsl <dsl@NetBSD.org>2006-02-11 18:37:36 +0000
committerdsl <dsl@NetBSD.org>2006-02-11 18:37:36 +0000
commit49c83bef6a73449e82fffd3905be554014b4cce3 (patch)
tree8aff6d9d4bd2df722feae103cc4157a7e88a8d30 /usr.bin/make/make.c
parentf0bf09cccc737df03aaba3e221ff09ba6d0f4ec8 (diff)
Debug trace all the targets we are actually intending making.
De-optimise the getting of a job token so we don't re-order the job list when there are no tokens. This might have helped etc/Makefile, but isn't enough.
Diffstat (limited to 'usr.bin/make/make.c')
-rw-r--r--usr.bin/make/make.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/usr.bin/make/make.c b/usr.bin/make/make.c
index c4af329171a..5261939f12b 100644
--- a/usr.bin/make/make.c
+++ b/usr.bin/make/make.c
@@ -1,4 +1,4 @@
-/* $NetBSD: make.c,v 1.59 2006/01/04 21:16:53 dsl Exp $ */
+/* $NetBSD: make.c,v 1.60 2006/02/11 18:37:36 dsl Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: make.c,v 1.59 2006/01/04 21:16:53 dsl Exp $";
+static char rcsid[] = "$NetBSD: make.c,v 1.60 2006/02/11 18:37:36 dsl Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)make.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: make.c,v 1.59 2006/01/04 21:16:53 dsl Exp $");
+__RCSID("$NetBSD: make.c,v 1.60 2006/02/11 18:37:36 dsl Exp $");
#endif
#endif /* not lint */
#endif
@@ -934,6 +934,11 @@ MakeStartJobs(void)
int have_token = 0;
while (!Lst_IsEmpty (toBeMade)) {
+ /* Get token now to avoid cycling job-list when we only have 1 token */
+ if (!have_token && !Job_TokenWithdraw())
+ break;
+ have_token = 1;
+
gn = (GNode *)Lst_DeQueue(toBeMade);
if (DEBUG(MAKE)) {
printf("Examining %s...", gn->name);
@@ -967,12 +972,6 @@ MakeStartJobs(void)
}
}
- if (!have_token && !Job_TokenWithdraw()) {
- Lst_AtFront(toBeMade, gn);
- break;
- }
- have_token = 1;
-
numNodes--;
if (Make_OODate(gn)) {
if (DEBUG(MAKE)) {
@@ -1192,6 +1191,10 @@ Make_Run(Lst targs)
int errors; /* Number of errors the Job module reports */
toBeMade = Make_ExpandUse(targs);
+ if (DEBUG(MAKE)) {
+ printf("#***# toBeMade\n");
+ Lst_ForEach(toBeMade, Targ_PrintNode, 0);
+ }
if (queryFlag) {
/*