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): make Job_Touch simpler



details:   https://anonhg.NetBSD.org/src/rev/03ba0747d382
branches:  trunk
changeset: 979049:03ba0747d382
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Dec 12 11:33:10 2020 +0000

description:
make(1): make Job_Touch simpler

diffstat:

 usr.bin/make/job.c |  17 ++++++-----------
 1 files changed, 6 insertions(+), 11 deletions(-)

diffs (40 lines):

diff -r 8de943546bcc -r 03ba0747d382 usr.bin/make/job.c
--- a/usr.bin/make/job.c        Sat Dec 12 11:28:29 2020 +0000
+++ b/usr.bin/make/job.c        Sat Dec 12 11:33:10 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: job.c,v 1.379 2020/12/12 11:28:29 rillig Exp $ */
+/*     $NetBSD: job.c,v 1.380 2020/12/12 11:33:10 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -143,7 +143,7 @@
 #include "trace.h"
 
 /*     "@(#)job.c      8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: job.c,v 1.379 2020/12/12 11:28:29 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.380 2020/12/12 11:33:10 rillig Exp $");
 
 /*
  * A shell defines how the commands are run.  All commands for a target are
@@ -1253,17 +1253,12 @@
        if (!GNode_ShouldExecute(gn))
                return;
 
-       if (gn->type & OP_ARCHV) {
+       if (gn->type & OP_ARCHV)
                Arch_Touch(gn);
-               return;
-       }
-
-       if (gn->type & OP_LIB) {
+       else if (gn->type & OP_LIB)
                Arch_TouchLib(gn);
-               return;
-       }
-
-       TouchRegular(gn);
+       else
+               TouchRegular(gn);
 }
 
 /* Make sure the given node has all the commands it needs.



Home | Main Index | Thread Index | Old Index