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): split and invert complex condition in ...
details: https://anonhg.NetBSD.org/src/rev/4c038d5761b8
branches: trunk
changeset: 945314:4c038d5761b8
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Oct 25 20:14:08 2020 +0000
description:
make(1): split and invert complex condition in Job_CheckCommands
diffstat:
usr.bin/make/job.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diffs (35 lines):
diff -r 25ed4469e04a -r 4c038d5761b8 usr.bin/make/job.c
--- a/usr.bin/make/job.c Sun Oct 25 20:09:28 2020 +0000
+++ b/usr.bin/make/job.c Sun Oct 25 20:14:08 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: job.c,v 1.279 2020/10/25 20:09:28 rillig Exp $ */
+/* $NetBSD: job.c,v 1.280 2020/10/25 20:14:08 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.279 2020/10/25 20:09:28 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.280 2020/10/25 20:14:08 rillig Exp $");
# define STATIC static
@@ -1179,8 +1179,14 @@
Boolean
Job_CheckCommands(GNode *gn, void (*abortProc)(const char *, ...))
{
- if (!GNode_IsTarget(gn) && Lst_IsEmpty(gn->commands) &&
- ((gn->type & OP_LIB) == 0 || Lst_IsEmpty(gn->children))) {
+ if (GNode_IsTarget(gn))
+ return TRUE;
+ if (!Lst_IsEmpty(gn->commands))
+ return TRUE;
+ if ((gn->type & OP_LIB) && !Lst_IsEmpty(gn->children))
+ return TRUE;
+
+ {
/*
* No commands. Look for .DEFAULT rule from which we might infer
* commands
Home |
Main Index |
Thread Index |
Old Index