Module Name: othersrc
Committed By: dholland
Date: Sat Mar 23 23:36:19 UTC 2013
Modified Files:
othersrc/usr.bin/dholland-make2: dir.c job.c parse.c
Log Message:
Merge -r1.66 of dir.c, -r1.171 of job.c, -r1.186 of parse.c from HEAD
(committed by Christos):
Keep track of the location where a dependency is defined, so we can report
about it.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 othersrc/usr.bin/dholland-make2/dir.c
cvs rdiff -u -r1.7 -r1.8 othersrc/usr.bin/dholland-make2/job.c
cvs rdiff -u -r1.12 -r1.13 othersrc/usr.bin/dholland-make2/parse.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: othersrc/usr.bin/dholland-make2/dir.c
diff -u othersrc/usr.bin/dholland-make2/dir.c:1.8 othersrc/usr.bin/dholland-make2/dir.c:1.9
--- othersrc/usr.bin/dholland-make2/dir.c:1.8 Sat Mar 23 22:40:36 2013
+++ othersrc/usr.bin/dholland-make2/dir.c Sat Mar 23 23:36:18 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: dir.c,v 1.8 2013/03/23 22:40:36 dholland Exp $ */
+/* $NetBSD: dir.c,v 1.9 2013/03/23 23:36:18 dholland Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -139,7 +139,7 @@
#include "hash.h"
#include "dir.h"
-__RCSID("$NetBSD: dir.c,v 1.8 2013/03/23 22:40:36 dholland Exp $");
+__RCSID("$NetBSD: dir.c,v 1.9 2013/03/23 23:36:18 dholland Exp $");
/*
* A search path consists of a list of Path structures. A Path structure
@@ -1428,8 +1428,9 @@ Dir_MTime(GNode *gn, Boolean recheck)
*/
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);
}
}
}
Index: othersrc/usr.bin/dholland-make2/job.c
diff -u othersrc/usr.bin/dholland-make2/job.c:1.7 othersrc/usr.bin/dholland-make2/job.c:1.8
--- othersrc/usr.bin/dholland-make2/job.c:1.7 Sat Mar 23 23:29:04 2013
+++ othersrc/usr.bin/dholland-make2/job.c Sat Mar 23 23:36:18 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: job.c,v 1.7 2013/03/23 23:29:04 dholland Exp $ */
+/* $NetBSD: job.c,v 1.8 2013/03/23 23:36:18 dholland Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -149,7 +149,7 @@
#include "trace.h"
# define STATIC static
-MAKE_RCSID("$NetBSD: job.c,v 1.7 2013/03/23 23:29:04 dholland Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.8 2013/03/23 23:36:18 dholland Exp $");
/*
* error handling variables
@@ -1230,8 +1230,8 @@ Job_CheckCommands(GNode *gn, void (*abor
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;
}
Index: othersrc/usr.bin/dholland-make2/parse.c
diff -u othersrc/usr.bin/dholland-make2/parse.c:1.12 othersrc/usr.bin/dholland-make2/parse.c:1.13
--- othersrc/usr.bin/dholland-make2/parse.c:1.12 Sat Mar 23 22:17:51 2013
+++ othersrc/usr.bin/dholland-make2/parse.c Sat Mar 23 23:36:18 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.12 2013/03/23 22:17:51 dholland Exp $ */
+/* $NetBSD: parse.c,v 1.13 2013/03/23 23:36:18 dholland Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -137,7 +137,7 @@
#include "buf.h"
#include "pathnames.h"
-MAKE_RCSID("$NetBSD: parse.c,v 1.12 2013/03/23 22:17:51 dholland Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.13 2013/03/23 23:36:18 dholland Exp $");
//#define CLEANUP
@@ -913,6 +913,8 @@ ParseDoOp(GNode *gn, int op)
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
@@ -986,6 +988,8 @@ ParseDoSrc(int tOp, const char *src)
*/
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;
for (i=0; i<glist_num(&targets); i++) {
ParseLinkSrc(glist_get(&targets, i), gn);
@@ -1019,6 +1023,8 @@ ParseDoSrc(int tOp, const char *src)
* source and the current one.
*/
gn = Targ_FindNode(src, TARG_CREATE);
+ if (doing_depend)
+ ParseMark(gn);
if (predecessor != NULL) {
glist_add(&predecessor->order_succ, gn, NULL);
glist_add(&gn->order_pred, predecessor, NULL);
@@ -1050,6 +1056,8 @@ ParseDoSrc(int tOp, const char *src)
/* 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 {
@@ -1280,6 +1288,8 @@ ParseDoDependency(char *line)
case dotError:
case Interrupt:
gn = Targ_FindNode(line, TARG_CREATE);
+ if (doing_depend)
+ ParseMark(gn);
gn->type |= OP_NOTMAIN|OP_SPECIAL;
glist_add(&targets, gn, NULL);
break;
@@ -1358,6 +1368,8 @@ ParseDoDependency(char *line)
} else {
gn = Suff_AddTransform(targName);
}
+ if (doing_depend)
+ ParseMark(gn);
glist_add(&targets, gn, NULL);
}