summaryrefslogtreecommitdiffstats
path: root/usr.bin/make
diff options
context:
space:
mode:
authorfjoe <fjoe@FreeBSD.org>2007-04-20 06:33:25 +0000
committerfjoe <fjoe@FreeBSD.org>2007-04-20 06:33:25 +0000
commit711037246e3ddfae7d52ff44a0f5d8d1c50e20eb (patch)
treecd30975b6b93db0a08c46c33c856835f3ec55609 /usr.bin/make
parent5abc85136d3414fb5078dd4b13d33911966818f4 (diff)
downloadFreeBSD-src-711037246e3ddfae7d52ff44a0f5d8d1c50e20eb.zip
FreeBSD-src-711037246e3ddfae7d52ff44a0f5d8d1c50e20eb.tar.gz
Improve logging when -dm is specified: if the node is considered
out-of-date print not only "modified before source" message but also the path of youngest source.
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/GNode.h1
-rw-r--r--usr.bin/make/make.c13
-rw-r--r--usr.bin/make/targ.c1
3 files changed, 7 insertions, 8 deletions
diff --git a/usr.bin/make/GNode.h b/usr.bin/make/GNode.h
index 382da55..71d2afd 100644
--- a/usr.bin/make/GNode.h
+++ b/usr.bin/make/GNode.h
@@ -170,6 +170,7 @@ typedef struct GNode {
int unmade; /* The number of unmade children */
int mtime; /* Its modification time */
int cmtime; /* Modification time of its youngest child */
+ struct GNode *cmtime_gn;/* Youngest child */
/*
* Links to parents for which this is an implied source, if any. (nodes
diff --git a/usr.bin/make/make.c b/usr.bin/make/make.c
index 9a39a9e..4ac5bb6 100644
--- a/usr.bin/make/make.c
+++ b/usr.bin/make/make.c
@@ -118,6 +118,7 @@ Make_TimeStamp(GNode *pgn, GNode *cgn)
if (cgn->mtime > pgn->cmtime) {
pgn->cmtime = cgn->mtime;
+ pgn->cmtime_gn = cgn;
}
return (0);
}
@@ -223,7 +224,8 @@ Make_OODate(GNode *gn)
* Make does it.
*/
if (gn->mtime < gn->cmtime) {
- DEBUGF(MAKE, ("modified before source..."));
+ DEBUGF(MAKE, ("modified before source (%s)...",
+ gn->cmtime_gn ? gn->cmtime_gn->path : "???"));
} else if (gn->mtime == 0) {
DEBUGF(MAKE, ("non-existent and no sources..."));
} else {
@@ -421,14 +423,9 @@ Make_Update(GNode *cgn)
pgn->unmade -= 1;
if (!(cgn->type & (OP_EXEC | OP_USE))) {
- if (cgn->made == MADE) {
+ if (cgn->made == MADE)
pgn->childMade = TRUE;
- if (pgn->cmtime < cgn->mtime) {
- pgn->cmtime = cgn->mtime;
- }
- } else {
- Make_TimeStamp(pgn, cgn);
- }
+ Make_TimeStamp(pgn, cgn);
}
if (pgn->unmade == 0) {
/*
diff --git a/usr.bin/make/targ.c b/usr.bin/make/targ.c
index fab3189..eac121e 100644
--- a/usr.bin/make/targ.c
+++ b/usr.bin/make/targ.c
@@ -141,6 +141,7 @@ Targ_NewGN(const char *name)
gn->childMade = FALSE;
gn->order = 0;
gn->mtime = gn->cmtime = 0;
+ gn->cmtime_gn = NULL;
Lst_Init(&gn->iParents);
Lst_Init(&gn->cohorts);
Lst_Init(&gn->parents);
OpenPOWER on IntegriCloud