Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make make(1): rename Make_TimeStamp to GNode_UpdateY...



details:   https://anonhg.NetBSD.org/src/rev/47c5aaea5938
branches:  trunk
changeset: 945835:47c5aaea5938
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Nov 08 08:26:22 2020 +0000

description:
make(1): rename Make_TimeStamp to GNode_UpdateYoungestChild

diffstat:

 usr.bin/make/compat.c |  10 +++++-----
 usr.bin/make/make.c   |  24 ++++++++++++------------
 usr.bin/make/make.h   |   4 ++--
 3 files changed, 19 insertions(+), 19 deletions(-)

diffs (136 lines):

diff -r 3d17ec7acc15 -r 47c5aaea5938 usr.bin/make/compat.c
--- a/usr.bin/make/compat.c     Sun Nov 08 08:12:17 2020 +0000
+++ b/usr.bin/make/compat.c     Sun Nov 08 08:26:22 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat.c,v 1.179 2020/11/07 14:32:12 rillig Exp $      */
+/*     $NetBSD: compat.c,v 1.180 2020/11/08 08:26:22 rillig Exp $      */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -96,7 +96,7 @@
 #include "pathnames.h"
 
 /*     "@(#)compat.c   8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: compat.c,v 1.179 2020/11/07 14:32:12 rillig Exp $");
+MAKE_RCSID("$NetBSD: compat.c,v 1.180 2020/11/08 08:26:22 rillig Exp $");
 
 static GNode *curTarg = NULL;
 static pid_t compatChild;
@@ -570,7 +570,7 @@
                pgn->flags |= FORCE;
            if (!(gn->type & OP_EXEC)) {
                pgn->flags |= CHILDMADE;
-               Make_TimeStamp(pgn, gn);
+               GNode_UpdateYoungestChild(pgn, gn);
            }
        } else if (opts.keepgoing) {
            pgn->flags &= ~(unsigned)REMAKE;
@@ -595,12 +595,12 @@
            case MADE:
                if (!(gn->type & OP_EXEC)) {
                    pgn->flags |= CHILDMADE;
-                   Make_TimeStamp(pgn, gn);
+                   GNode_UpdateYoungestChild(pgn, gn);
                }
                break;
            case UPTODATE:
                if (!(gn->type & OP_EXEC))
-                   Make_TimeStamp(pgn, gn);
+                   GNode_UpdateYoungestChild(pgn, gn);
                break;
            default:
                break;
diff -r 3d17ec7acc15 -r 47c5aaea5938 usr.bin/make/make.c
--- a/usr.bin/make/make.c       Sun Nov 08 08:12:17 2020 +0000
+++ b/usr.bin/make/make.c       Sun Nov 08 08:26:22 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: make.c,v 1.188 2020/11/07 21:22:37 rillig Exp $        */
+/*     $NetBSD: make.c,v 1.189 2020/11/08 08:26:22 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -86,8 +86,9 @@
  *                     place the parent on the toBeMade queue if it
  *                     should be.
  *
- *     Make_TimeStamp  Function to set the parent's youngestChild field
- *                     based on a child's modification time.
+ *     GNode_UpdateYoungestChild
+ *                     Update the node's youngestChild field based on the
+ *                     child's modification time.
  *
  *     Make_DoAllVar   Set up the various local variables for a
  *                     target, including the .ALLSRC variable, making
@@ -107,7 +108,7 @@
 #include "job.h"
 
 /*     "@(#)make.c     8.1 (Berkeley) 6/6/93"  */
-MAKE_RCSID("$NetBSD: make.c,v 1.188 2020/11/07 21:22:37 rillig Exp $");
+MAKE_RCSID("$NetBSD: make.c,v 1.189 2020/11/08 08:26:22 rillig Exp $");
 
 /* Sequence # to detect recursion. */
 static unsigned int checked = 1;
@@ -185,11 +186,10 @@
 
 /* Update the youngest child of the node, according to the given child. */
 void
-Make_TimeStamp(GNode *pgn, GNode *cgn)
+GNode_UpdateYoungestChild(GNode *gn, GNode *cgn)
 {
-    if (pgn->youngestChild == NULL || cgn->mtime > pgn->youngestChild->mtime) {
-       pgn->youngestChild = cgn;
-    }
+    if (gn->youngestChild == NULL || cgn->mtime > gn->youngestChild->mtime)
+       gn->youngestChild = cgn;
 }
 
 /* See if the node is out of date with respect to its sources.
@@ -331,7 +331,7 @@
     if (!oodate) {
        GNodeListNode *ln;
        for (ln = gn->parents->first; ln != NULL; ln = ln->next)
-           Make_TimeStamp(ln->datum, gn);
+           GNode_UpdateYoungestChild(ln->datum, gn);
     }
 
     return oodate;
@@ -367,7 +367,7 @@
     GNode *pgn = pgnp;
 
     (void)Dir_MTime(gn, 0);
-    Make_TimeStamp(pgn, gn);
+    GNode_UpdateYoungestChild(pgn, gn);
     pgn->unmade--;
 
     return 0;
@@ -672,10 +672,10 @@
            continue;
        }
 
-       if ( ! (cgn->type & (OP_EXEC|OP_USE|OP_USEBEFORE))) {
+       if (!(cgn->type & (OP_EXEC | OP_USE | OP_USEBEFORE))) {
            if (cgn->made == MADE)
                pgn->flags |= CHILDMADE;
-           (void)Make_TimeStamp(pgn, cgn);
+           GNode_UpdateYoungestChild(pgn, cgn);
        }
 
        /*
diff -r 3d17ec7acc15 -r 47c5aaea5938 usr.bin/make/make.h
--- a/usr.bin/make/make.h       Sun Nov 08 08:12:17 2020 +0000
+++ b/usr.bin/make/make.h       Sun Nov 08 08:26:22 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: make.h,v 1.198 2020/11/08 01:39:24 rillig Exp $        */
+/*     $NetBSD: make.h,v 1.199 2020/11/08 08:26:22 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -636,7 +636,7 @@
 
 #include "nonints.h"
 
-void Make_TimeStamp(GNode *, GNode *);
+void GNode_UpdateYoungestChild(GNode *, GNode *);
 Boolean Make_OODate(GNode *);
 void Make_ExpandUse(GNodeList *);
 time_t Make_Recheck(GNode *);



Home | Main Index | Thread Index | Old Index