Module Name: src
Committed By: rillig
Date: Fri Jan 29 23:45:35 UTC 2021
Modified Files:
src/usr.bin/make: job.c
Log Message:
make(1): explain seemingly redundant condition in jobs mode
To generate a diff of this commit:
cvs rdiff -u -r1.401 -r1.402 src/usr.bin/make/job.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/job.c
diff -u src/usr.bin/make/job.c:1.401 src/usr.bin/make/job.c:1.402
--- src/usr.bin/make/job.c:1.401 Fri Jan 29 23:33:24 2021
+++ src/usr.bin/make/job.c Fri Jan 29 23:45:35 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: job.c,v 1.401 2021/01/29 23:33:24 rillig Exp $ */
+/* $NetBSD: job.c,v 1.402 2021/01/29 23:45: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.401 2021/01/29 23:33:24 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.402 2021/01/29 23:45:35 rillig Exp $");
/*
* A shell defines how the commands are run. All commands for a target are
@@ -1672,9 +1672,11 @@ JobStart(GNode *gn, Boolean special)
} else if (((gn->type & OP_MAKE) && !opts.noRecursiveExecute) ||
(!opts.noExecute && !opts.touchFlag)) {
/*
- * XXX: The above conditions seem needlessly repeated but
- * are subtly different.
+ * The above conditions look very similar to
+ * GNode_ShouldExecute but are subtly different.
+ * They prevent that .MAKE targets are touched.
*/
+
JobWriteShellCommands(job, gn, cmdsOK, &run);
(void)fflush(job->cmdFILE);
} else if (!GNode_ShouldExecute(gn)) {