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): clean up Make_OODate and Make_Run



details:   https://anonhg.NetBSD.org/src/rev/95d0d1315a8a
branches:  trunk
changeset: 956786:95d0d1315a8a
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Nov 07 21:22:37 2020 +0000

description:
make(1): clean up Make_OODate and Make_Run

diffstat:

 usr.bin/make/make.c |  16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diffs (54 lines):

diff -r 161c0f88c385 -r 95d0d1315a8a usr.bin/make/make.c
--- a/usr.bin/make/make.c       Sat Nov 07 21:04:43 2020 +0000
+++ b/usr.bin/make/make.c       Sat Nov 07 21:22:37 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: make.c,v 1.187 2020/11/07 10:16:18 rillig Exp $        */
+/*     $NetBSD: make.c,v 1.188 2020/11/07 21:22:37 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -107,7 +107,7 @@
 #include "job.h"
 
 /*     "@(#)make.c     8.1 (Berkeley) 6/6/93"  */
-MAKE_RCSID("$NetBSD: make.c,v 1.187 2020/11/07 10:16:18 rillig Exp $");
+MAKE_RCSID("$NetBSD: make.c,v 1.188 2020/11/07 21:22:37 rillig Exp $");
 
 /* Sequence # to detect recursion. */
 static unsigned int checked = 1;
@@ -215,11 +215,10 @@
     if (!(gn->type & (OP_JOIN|OP_USE|OP_USEBEFORE|OP_EXEC))) {
        (void)Dir_MTime(gn, 1);
        if (DEBUG(MAKE)) {
-           if (gn->mtime != 0) {
+           if (gn->mtime != 0)
                debug_printf("modified %s...", Targ_FmtTime(gn->mtime));
-           } else {
+           else
                debug_printf("non-existent...");
-           }
        }
     }
 
@@ -244,8 +243,7 @@
         */
        DEBUG0(MAKE, ".USE node...");
        oodate = FALSE;
-    } else if ((gn->type & OP_LIB) &&
-              ((gn->mtime==0) || Arch_IsLib(gn))) {
+    } else if ((gn->type & OP_LIB) && (gn->mtime == 0 || Arch_IsLib(gn))) {
        DEBUG0(MAKE, "library...");
 
        /*
@@ -1353,9 +1351,9 @@
        MakePrintStatusList(targs, &errors);
        if (DEBUG(MAKE)) {
            debug_printf("done: errors %d\n", errors);
-           if (errors != 0)
+           if (errors > 0)
                Targ_PrintGraph(4);
        }
     }
-    return errors != 0;
+    return errors > 0;
 }



Home | Main Index | Thread Index | Old Index