Module Name: src
Committed By: rillig
Date: Sat Jan 30 13:12:00 UTC 2021
Modified Files:
src/usr.bin/make: job.c
Log Message:
make(1): clean up JobWriteShellCommands
To generate a diff of this commit:
cvs rdiff -u -r1.403 -r1.404 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.403 src/usr.bin/make/job.c:1.404
--- src/usr.bin/make/job.c:1.403 Sat Jan 30 13:02:54 2021
+++ src/usr.bin/make/job.c Sat Jan 30 13:12:00 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: job.c,v 1.403 2021/01/30 13:02:54 rillig Exp $ */
+/* $NetBSD: job.c,v 1.404 2021/01/30 13:12:00 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.403 2021/01/30 13:02:54 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.404 2021/01/30 13:12:00 rillig Exp $");
/*
* A shell defines how the commands are run. All commands for a target are
@@ -1593,11 +1593,6 @@ JobWriteShellCommands(Job *job, GNode *g
Punt("Could not fdopen %s", tfile);
(void)fcntl(fileno(job->cmdFILE), F_SETFD, FD_CLOEXEC);
- /*
- * Send the commands to the command file, flush all its
- * buffers then rewind and remove the thing.
- */
- *out_run = TRUE;
#ifdef USE_META
if (useMeta) {
@@ -1607,9 +1602,7 @@ JobWriteShellCommands(Job *job, GNode *g
}
#endif
- /* We can do all the commands at once. hooray for sanity */
- if (!JobPrintCommands(job))
- *out_run = FALSE;
+ *out_run = JobPrintCommands(job);
free(tfile);
}