summaryrefslogtreecommitdiff
path: root/usr.bin/make/parse.c
diff options
context:
space:
mode:
authordsl <dsl@NetBSD.org>2006-02-11 20:59:49 +0000
committerdsl <dsl@NetBSD.org>2006-02-11 20:59:49 +0000
commit2bfcea2ea3534766b1f1900c4fea4033835b781a (patch)
tree99b2ed8c557e2331fb3cd275ba282bd41407e6e9 /usr.bin/make/parse.c
parente99202b6cf02944eb9a6b36e459d39c09e77ee47 (diff)
Add some more debug prints.
Diffstat (limited to 'usr.bin/make/parse.c')
-rw-r--r--usr.bin/make/parse.c44
1 files changed, 30 insertions, 14 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index 56d2c379492..64ef9007027 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.108 2006/01/22 19:54:55 dsl Exp $ */
+/* $NetBSD: parse.c,v 1.109 2006/02/11 20:59:49 dsl Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.108 2006/01/22 19:54:55 dsl Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.109 2006/02/11 20:59:49 dsl Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: parse.c,v 1.108 2006/01/22 19:54:55 dsl Exp $");
+__RCSID("$NetBSD: parse.c,v 1.109 2006/02/11 20:59:49 dsl Exp $");
#endif
#endif /* not lint */
#endif
@@ -515,6 +515,11 @@ ParseLinkSrc(ClientData pgnp, ClientData cgnp)
if (specType == Not)
(void)Lst_AtEnd(cgn->parents, (ClientData)pgn);
pgn->unmade += 1;
+ if (DEBUG(PARSE)) {
+ printf("# ParseLinkSrc: added child %s - %s\n", pgn->name, cgn->name);
+ Targ_PrintNode(pgn, 0);
+ Targ_PrintNode(cgn, 0);
+ }
return (0);
}
@@ -620,18 +625,23 @@ ParseAddDep(ClientData pp, ClientData sp)
if (DEBUG(PARSE))
printf("ParseAddDep: %p(%s):%d %p(%s):%d\n",
p, p->name, p->order, s, s->name, s->order);
- if (p->order < s->order) {
- /*
- * XXX: This can cause loops, and loops can cause unmade targets,
- * but checking is tedious, and the debugging output can show the
- * problem
- */
- (void)Lst_AtEnd(p->successors, (ClientData)s);
- (void)Lst_AtEnd(s->preds, (ClientData)p);
- return 0;
- }
- else
+ if (p->order >= s->order)
return 1;
+
+ /*
+ * XXX: This can cause loops, and loops can cause unmade targets,
+ * but checking is tedious, and the debugging output can show the
+ * problem
+ */
+ (void)Lst_AtEnd(p->successors, (ClientData)s);
+ (void)Lst_AtEnd(s->preds, (ClientData)p);
+ if (DEBUG(PARSE)) {
+ printf("# ParseAddDep: added .WAIT dependency %s - %s\n",
+ p->name, s->name);
+ Targ_PrintNode(p, 0);
+ Targ_PrintNode(s, 0);
+ }
+ return 0;
}
/* -
@@ -782,6 +792,12 @@ ParseDoSrc(int tOp, char *src, Lst allsrc, Boolean resolve)
if (predecessor != NILGNODE) {
(void)Lst_AtEnd(predecessor->successors, (ClientData)gn);
(void)Lst_AtEnd(gn->preds, (ClientData)predecessor);
+ if (DEBUG(PARSE)) {
+ printf("# ParseDoSrc: added Order dependency %s - %s\n",
+ predecessor->name, gn->name);
+ Targ_PrintNode(predecessor, 0);
+ Targ_PrintNode(gn, 0);
+ }
}
/*
* The current source now becomes the predecessor for the next one.