diff options
| author | christos <christos@NetBSD.org> | 2013-03-05 02:04:10 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2013-03-05 02:04:10 +0000 |
| commit | da7779a335cc2108064b35bf45e1cb79b4fcd148 (patch) | |
| tree | 0f457f95d67f9b508e69054ceb1a0e5fbd90cc4e /usr.bin/make | |
| parent | de4314f0ed0518152576caad766d382c30422d39 (diff) | |
Keep track of the location where a dependency is defined, so we can report
about it.
Diffstat (limited to 'usr.bin/make')
| -rw-r--r-- | usr.bin/make/dir.c | 11 | ||||
| -rw-r--r-- | usr.bin/make/job.c | 10 | ||||
| -rw-r--r-- | usr.bin/make/parse.c | 18 |
3 files changed, 26 insertions, 13 deletions
diff --git a/usr.bin/make/dir.c b/usr.bin/make/dir.c index 1c56ea3e897..d43ad40e88d 100644 --- a/usr.bin/make/dir.c +++ b/usr.bin/make/dir.c @@ -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 @@ 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); } } } diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c index 554bc92373e..4195c84ec49 100644 --- a/usr.bin/make/job.c +++ b/usr.bin/make/job.c @@ -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 @@ Job_CheckCommands(GNode *gn, void (*abortProc)(const char *, ...)) 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 --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c index 4e1392d8c31..673ee0c426b 100644 --- a/usr.bin/make/parse.c +++ b/usr.bin/make/parse.c @@ -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 @@ ParseDoOp(void *gnp, void *opp) 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 @@ 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; Lst_ForEach(targets, ParseLinkSrc, gn); return; @@ -1008,6 +1012,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) { (void)Lst_AtEnd(predecessor->order_succ, gn); (void)Lst_AtEnd(gn->order_pred, predecessor); @@ -1039,6 +1045,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 { @@ -1310,6 +1318,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; (void)Lst_AtEnd(targets, gn); break; @@ -1388,6 +1398,8 @@ ParseDoDependency(char *line) } else { gn = Suff_AddTransform(targName); } + if (doing_depend) + ParseMark(gn); (void)Lst_AtEnd(targets, gn); } |
