summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/make/engine.c9
-rw-r--r--usr.bin/make/gnode.h3
-rw-r--r--usr.bin/make/targ.c3
3 files changed, 10 insertions, 5 deletions
diff --git a/usr.bin/make/engine.c b/usr.bin/make/engine.c
index 65dfd039d8c..db585321415 100644
--- a/usr.bin/make/engine.c
+++ b/usr.bin/make/engine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: engine.c,v 1.41 2013/04/23 14:32:53 espie Exp $ */
+/* $OpenBSD: engine.c,v 1.42 2013/05/14 18:47:40 espie Exp $ */
/*
* Copyright (c) 2012 Marc Espie.
*
@@ -286,8 +286,10 @@ Job_Touch(GNode *gn)
void
Make_TimeStamp(GNode *parent, GNode *child)
{
- if (is_strictly_before(parent->cmtime, child->mtime))
+ if (is_strictly_before(parent->cmtime, child->mtime)) {
parent->cmtime = child->mtime;
+ parent->youngest = child;
+ }
}
void
@@ -500,7 +502,8 @@ Make_OODate(GNode *gn)
*/
if (DEBUG(MAKE)) {
if (is_strictly_before(gn->mtime, gn->cmtime))
- printf("modified before source...");
+ printf("modified before source(%s)...",
+ gn->youngest->name);
else if (is_out_of_date(gn->mtime))
printf("non-existent and no sources...");
else
diff --git a/usr.bin/make/gnode.h b/usr.bin/make/gnode.h
index 7c98d2e2d5b..746dfe1c732 100644
--- a/usr.bin/make/gnode.h
+++ b/usr.bin/make/gnode.h
@@ -1,6 +1,6 @@
#ifndef GNODE_H
#define GNODE_H
-/* $OpenBSD: gnode.h,v 1.24 2013/04/23 14:32:53 espie Exp $ */
+/* $OpenBSD: gnode.h,v 1.25 2013/05/14 18:47:40 espie Exp $ */
/*
* Copyright (c) 2001 Marc Espie.
@@ -146,6 +146,7 @@ struct GNode_ {
struct timespec cmtime; /* The modification time of its youngest
* child */
+ GNode *youngest;
GNode *impliedsrc;
LIST cohorts; /* Other nodes for the :: operator */
LIST parents; /* Nodes that depend on this one */
diff --git a/usr.bin/make/targ.c b/usr.bin/make/targ.c
index c942476f698..e348095878b 100644
--- a/usr.bin/make/targ.c
+++ b/usr.bin/make/targ.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: targ.c,v 1.70 2013/04/23 14:32:53 espie Exp $ */
+/* $OpenBSD: targ.c,v 1.71 2013/05/14 18:47:40 espie Exp $ */
/* $NetBSD: targ.c,v 1.11 1997/02/20 16:51:50 christos Exp $ */
/*
@@ -159,6 +159,7 @@ Targ_NewGNi(const char *name, const char *ename)
gn->order = 0;
ts_set_out_of_date(gn->mtime);
ts_set_out_of_date(gn->cmtime);
+ gn->youngest = gn;
Lst_Init(&gn->cohorts);
Lst_Init(&gn->parents);
Lst_Init(&gn->children);