Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make meta.c: report OODATE value if not empty



details:   https://anonhg.NetBSD.org/src/rev/138503a35fe0
branches:  trunk
changeset: 968605:138503a35fe0
user:      sjg <sjg%NetBSD.org@localhost>
date:      Wed Jan 22 00:26:45 2020 +0000

description:
meta.c: report OODATE value if not empty

When a target is out-of-date per normal make rules
.OODATE will be non-empty, report this in .meta file
to help clarify why target was updated.

diffstat:

 usr.bin/make/meta.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 9ce85d1abdc6 -r 138503a35fe0 usr.bin/make/meta.c
--- a/usr.bin/make/meta.c       Tue Jan 21 22:08:41 2020 +0000
+++ b/usr.bin/make/meta.c       Wed Jan 22 00:26:45 2020 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: meta.c,v 1.75 2020/01/19 19:49:37 riastradh Exp $ */
+/*      $NetBSD: meta.c,v 1.76 2020/01/22 00:26:45 sjg Exp $ */
 
 /*
  * Implement 'meta' mode.
@@ -462,7 +462,7 @@
     const char *tname;
     char *fname;
     const char *cp;
-    char *p[4];                                /* >= possible uses */
+    char *p[5];                                /* >= possible uses */
     int i;
 
     mf.fp = NULL;
@@ -517,7 +517,10 @@
 
     fprintf(mf.fp, "CWD %s\n", getcwd(buf, sizeof(buf)));
     fprintf(mf.fp, "TARGET %s\n", tname);
-
+    cp = Var_Value(".OODATE", gn, &p[i++]);
+    if (cp && *cp) {
+           fprintf(mf.fp, "OODATE %s\n", cp);
+    }
     if (metaEnv) {
        for (ptr = environ; *ptr != NULL; ptr++)
            fprintf(mf.fp, "ENV %s\n", *ptr);



Home | Main Index | Thread Index | Old Index