Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make Keep track of the location where a dependency i...
details: https://anonhg.NetBSD.org/src/rev/7fc9aa687ab4
branches: trunk
changeset: 785226:7fc9aa687ab4
user: christos <christos%NetBSD.org@localhost>
date: Tue Mar 05 02:04:10 2013 +0000
description:
Keep track of the location where a dependency is defined, so we can report
about it.
diffstat:
usr.bin/make/dir.c | 11 ++++++-----
usr.bin/make/job.c | 10 +++++-----
usr.bin/make/parse.c | 18 +++++++++++++++---
3 files changed, 26 insertions(+), 13 deletions(-)
diffs (155 lines):
diff -r e29d28158144 -r 7fc9aa687ab4 usr.bin/make/dir.c
--- a/usr.bin/make/dir.c Tue Mar 05 02:02:07 2013 +0000
+++ b/usr.bin/make/dir.c Tue Mar 05 02:04:10 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dir.c,v 1.65 2012/06/12 19:21:50 joerg Exp $ */
+/* $NetBSD: dir.c,v 1.66 2013/03/05 02:04:10 christos Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: dir.c,v 1.65 2012/06/12 19:21:50 joerg Exp $";
+static char rcsid[] = "$NetBSD: dir.c,v 1.66 2013/03/05 02:04:10 christos Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94";
#else
-__RCSID("$NetBSD: dir.c,v 1.65 2012/06/12 19:21:50 joerg Exp $");
+__RCSID("$NetBSD: dir.c,v 1.66 2013/03/05 02:04:10 christos Exp $");
#endif
#endif /* not lint */
#endif
@@ -1464,8 +1464,9 @@
*/
gn->path = bmake_strdup(fullName);
fprintf(stdout,
- "%s: ignoring stale %s for %s, found %s\n",
- progname, makeDependfile, gn->name, fullName);
+ "%s: %s, %d: ignoring stale %s for %s, found %s\n",
+ progname, gn->fname, gn->lineno,
+ makeDependfile, gn->name, fullName);
}
}
}
diff -r e29d28158144 -r 7fc9aa687ab4 usr.bin/make/job.c
--- a/usr.bin/make/job.c Tue Mar 05 02:02:07 2013 +0000
+++ b/usr.bin/make/job.c Tue Mar 05 02:04:10 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: job.c,v 1.170 2013/02/26 00:45:27 christos Exp $ */
+/* $NetBSD: job.c,v 1.171 2013/03/05 02:04:10 christos Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: job.c,v 1.170 2013/02/26 00:45:27 christos Exp $";
+static char rcsid[] = "$NetBSD: job.c,v 1.171 2013/03/05 02:04:10 christos Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: job.c,v 1.170 2013/02/26 00:45:27 christos Exp $");
+__RCSID("$NetBSD: job.c,v 1.171 2013/03/05 02:04:10 christos Exp $");
#endif
#endif /* not lint */
#endif
@@ -1232,8 +1232,8 @@
static const char msg[] = ": don't know how to make";
if (gn->flags & FROM_DEPEND) {
- fprintf(stdout, "%s: ignoring stale %s for %s\n",
- progname, makeDependfile, gn->name);
+ fprintf(stdout, "%s: %s, %d: ignoring stale %s for %s\n",
+ progname, gn->fname, gn->lineno, makeDependfile, gn->name);
return TRUE;
}
diff -r e29d28158144 -r 7fc9aa687ab4 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c Tue Mar 05 02:02:07 2013 +0000
+++ b/usr.bin/make/parse.c Tue Mar 05 02:04:10 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.185 2012/06/12 19:21:51 joerg Exp $ */
+/* $NetBSD: parse.c,v 1.186 2013/03/05 02:04:11 christos Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.185 2012/06/12 19:21:51 joerg Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.186 2013/03/05 02:04:11 christos 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.185 2012/06/12 19:21:51 joerg Exp $");
+__RCSID("$NetBSD: parse.c,v 1.186 2013/03/05 02:04:11 christos Exp $");
#endif
#endif /* not lint */
#endif
@@ -905,6 +905,8 @@
gn->type |= op & ~OP_OPMASK;
cohort = Targ_FindNode(gn->name, TARG_NOHASH);
+ if (doing_depend)
+ ParseMark(cohort);
/*
* Make the cohort invisible as well to avoid duplicating it into
* other variables. True, parents of this target won't tend to do
@@ -977,6 +979,8 @@
*/
snprintf(wait_src, sizeof wait_src, ".WAIT_%u", ++wait_number);
gn = Targ_FindNode(wait_src, TARG_NOHASH);
+ if (doing_depend)
+ ParseMark(gn);
gn->type = OP_WAIT | OP_PHONY | OP_DEPENDS | OP_NOTMAIN;
Lst_ForEach(targets, ParseLinkSrc, gn);
return;
@@ -1008,6 +1012,8 @@
* source and the current one.
*/
gn = Targ_FindNode(src, TARG_CREATE);
+ if (doing_depend)
+ ParseMark(gn);
if (predecessor != NULL) {
(void)Lst_AtEnd(predecessor->order_succ, gn);
(void)Lst_AtEnd(gn->order_pred, predecessor);
@@ -1039,6 +1045,8 @@
/* Find/create the 'src' node and attach to all targets */
gn = Targ_FindNode(src, TARG_CREATE);
+ if (doing_depend)
+ ParseMark(gn);
if (tOp) {
gn->type |= tOp;
} else {
@@ -1310,6 +1318,8 @@
case dotError:
case Interrupt:
gn = Targ_FindNode(line, TARG_CREATE);
+ if (doing_depend)
+ ParseMark(gn);
gn->type |= OP_NOTMAIN|OP_SPECIAL;
(void)Lst_AtEnd(targets, gn);
break;
@@ -1388,6 +1398,8 @@
} else {
gn = Suff_AddTransform(targName);
}
+ if (doing_depend)
+ ParseMark(gn);
(void)Lst_AtEnd(targets, gn);
}
Home |
Main Index |
Thread Index |
Old Index