=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/engine.c,v retrieving revision 1.62 retrieving revision 1.63 diff -c -r1.62 -r1.63 *** src/usr.bin/make/engine.c 2020/01/13 14:15:21 1.62 --- src/usr.bin/make/engine.c 2020/01/13 14:51:50 1.63 *************** *** 1,4 **** ! /* $OpenBSD: engine.c,v 1.62 2020/01/13 14:15:21 espie Exp $ */ /* * Copyright (c) 2012 Marc Espie. * --- 1,4 ---- ! /* $OpenBSD: engine.c,v 1.63 2020/01/13 14:51:50 espie Exp $ */ /* * Copyright (c) 2012 Marc Espie. * *************** *** 603,610 **** _exit(1); } - static Job myjob; - void job_attach_node(Job *job, GNode *node) { --- 603,608 ---- *************** *** 680,686 **** * JOB_IS_EXPENSIVE, perform the computation for * sequential make to figure out whether to display the * command or not. */ ! if ((job->flags & JOB_SILENT) && job == &myjob) determine_expensive_job(job); if ((job->flags & (JOB_SILENT | JOB_IS_EXPENSIVE)) == JOB_SILENT) --- 678,684 ---- * JOB_IS_EXPENSIVE, perform the computation for * sequential make to figure out whether to display the * command or not. */ ! if ((job->flags & JOB_SILENT) && sequential) determine_expensive_job(job); if ((job->flags & (JOB_SILENT | JOB_IS_EXPENSIVE)) == JOB_SILENT) *************** *** 702,718 **** int run_gnode(GNode *gn) { if (!gn || (gn->type & OP_DUMMY)) return NOSUCHNODE; ! job_attach_node(&myjob, gn); ! while (myjob.exit_type == JOB_EXIT_OKAY) { ! bool finished = job_run_next(&myjob); if (finished) break; ! handle_one_job(&myjob); } return gn->built_status; } --- 700,722 ---- int run_gnode(GNode *gn) { + Job *j; if (!gn || (gn->type & OP_DUMMY)) return NOSUCHNODE; ! assert(availableJobs != NULL); ! j = availableJobs; ! availableJobs = availableJobs->next; ! job_attach_node(j, gn); ! while (j->exit_type == JOB_EXIT_OKAY) { ! bool finished = job_run_next(j); if (finished) break; ! handle_one_job(j); } + j->next = availableJobs; + availableJobs = j; return gn->built_status; }