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): in JobStart, negate 'noExec' to 'run'
details: https://anonhg.NetBSD.org/src/rev/4dd88f8d1fa0
branches: trunk
changeset: 957761:4dd88f8d1fa0
user: rillig <rillig%NetBSD.org@localhost>
date: Thu Dec 10 20:14:35 2020 +0000
description:
make(1): in JobStart, negate 'noExec' to 'run'
diffstat:
usr.bin/make/job.c | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)
diffs (76 lines):
diff -r 919a0c54713e -r 4dd88f8d1fa0 usr.bin/make/job.c
--- a/usr.bin/make/job.c Thu Dec 10 20:10:03 2020 +0000
+++ b/usr.bin/make/job.c Thu Dec 10 20:14:35 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: job.c,v 1.352 2020/12/10 20:10:03 rillig Exp $ */
+/* $NetBSD: job.c,v 1.353 2020/12/10 20:14:35 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.352 2020/12/10 20:10:03 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.353 2020/12/10 20:14:35 rillig Exp $");
/*
* A shell defines how the commands are run. All commands for a target are
@@ -1517,7 +1517,7 @@
Job *job; /* new job descriptor */
char *argv[10]; /* Argument vector to shell */
Boolean cmdsOK; /* true if the nodes commands were all right */
- Boolean noExec; /* Set true if we decide not to run the job */
+ Boolean run;
int tfd; /* File descriptor to the temp file */
for (job = job_table; job < job_table_end; job++) {
@@ -1586,7 +1586,7 @@
* Send the commands to the command file, flush all its
* buffers then rewind and remove the thing.
*/
- noExec = FALSE;
+ run = TRUE;
#ifdef USE_META
if (useMeta) {
@@ -1601,11 +1601,10 @@
/*
* If we didn't print out any commands to the shell script,
- * there's not much point in executing the shell, is there?
+ * there's no point in executing the shell.
*/
- if (numCommands == 0) {
- noExec = TRUE;
- }
+ if (numCommands == 0)
+ run = FALSE;
free(tfile);
} else if (!GNode_ShouldExecute(gn)) {
@@ -1625,7 +1624,7 @@
if (cmdsOK)
JobPrintCommands(job);
/* Don't execute the shell, thank you. */
- noExec = TRUE;
+ run = FALSE;
} else {
/*
* Just touch the target and note that no shell should be
@@ -1635,13 +1634,13 @@
*/
job->cmdFILE = stdout;
Job_Touch(gn, (job->flags & JOB_SILENT) != 0);
- noExec = TRUE;
+ run = FALSE;
}
/* Just in case it isn't already... */
(void)fflush(job->cmdFILE);
/* If we're not supposed to execute a shell, don't. */
- if (noExec) {
+ if (!run) {
if (!(job->flags & JOB_SPECIAL))
Job_TokenReturn();
/* Unlink and close the command file if we opened one */
Home |
Main Index |
Thread Index |
Old Index