Module Name: src
Committed By: rillig
Date: Mon Jul 22 18:15:04 UTC 2024
Modified Files:
src/usr.bin/make: job.c
Log Message:
make: remove dead code
To generate a diff of this commit:
cvs rdiff -u -r1.482 -r1.483 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.482 src/usr.bin/make/job.c:1.483
--- src/usr.bin/make/job.c:1.482 Mon Jul 22 18:11:15 2024
+++ src/usr.bin/make/job.c Mon Jul 22 18:15:04 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: job.c,v 1.482 2024/07/22 18:11:15 rillig Exp $ */
+/* $NetBSD: job.c,v 1.483 2024/07/22 18:15:04 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -141,7 +141,7 @@
#include "trace.h"
/* "@(#)job.c 8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: job.c,v 1.482 2024/07/22 18:11:15 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.483 2024/07/22 18:15:04 rillig Exp $");
/*
* A shell defines how the commands are run. All commands for a target are
@@ -1943,30 +1943,12 @@ again:
static void
JobRun(GNode *targ)
{
-#if 0
- /*
- * Unfortunately it is too complicated to run .BEGIN, .END, and
- * .INTERRUPT job in the parallel job module. As of 2020-09-25,
- * unit-tests/deptgt-end-jobs.mk hangs in an endless loop.
- *
- * Running these jobs in compat mode also guarantees that these
- * jobs do not overlap with other unrelated jobs.
- */
- GNodeList lst = LST_INIT;
- Lst_Append(&lst, targ);
- (void)Make_Run(&lst);
- Lst_Done(&lst);
- JobStart(targ, true);
- while (jobTokensRunning != 0) {
- Job_CatchOutput();
- }
-#else
+ /* Don't let these special jobs overlap with other unrelated jobs. */
Compat_Make(targ, targ);
if (GNode_IsError(targ)) {
PrintOnError(targ, "\n\nStop.\n");
exit(1);
}
-#endif
}
/*
@@ -2905,11 +2887,6 @@ Job_RunTarget(const char *target, const
Var_Set(gn, ALLSRC, fname);
JobRun(gn);
- /* XXX: Replace with GNode_IsError(gn) */
- if (gn->made == ERROR) {
- PrintOnError(gn, "\n\nStop.\n");
- exit(1);
- }
return true;
}