diff options
author | 2020-01-13 14:14:24 +0000 | |
---|---|---|
committer | 2020-01-13 14:14:24 +0000 | |
commit | d211a910f54dd08db306a014847cdc9f4c6b56d4 (patch) | |
tree | b8d4cf121d6a179eeac50f2d6bee836eea20a5ad | |
parent | concept borrowed from netbsd: turns out SPECIAL_SOURCE/TARGET is no longer (diff) | |
download | wireguard-openbsd-d211a910f54dd08db306a014847cdc9f4c6b56d4.tar.xz wireguard-openbsd-d211a910f54dd08db306a014847cdc9f4c6b56d4.zip |
move expensive heuristics a bit and explain better why we do that
in that error case.
-rw-r--r-- | usr.bin/make/engine.c | 7 | ||||
-rw-r--r-- | usr.bin/make/job.c | 10 |
2 files changed, 8 insertions, 9 deletions
diff --git a/usr.bin/make/engine.c b/usr.bin/make/engine.c index 4a6bd41b9a4..e837621cdb6 100644 --- a/usr.bin/make/engine.c +++ b/usr.bin/make/engine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: engine.c,v 1.60 2019/12/24 13:57:42 espie Exp $ */ +/* $OpenBSD: engine.c,v 1.61 2020/01/13 14:14:24 espie Exp $ */ /* * Copyright (c) 2012 Marc Espie. * @@ -666,9 +666,6 @@ job_handle_status(Job *job, int status) printf(" in target '%s'", job->node->name); if (job->flags & JOB_ERRCHECK) { job->node->built_status = ERROR; - /* compute expensive status if we really want it */ - if ((job->flags & JOB_SILENT) && job == &myjob) - determine_expensive_job(job); if (!keepgoing) { if (!silent) printf("\n"); @@ -679,6 +676,8 @@ job_handle_status(Job *job, int status) } printf(", line %lu of %s", job->location->lineno, job->location->fname); + if ((job->flags & JOB_SILENT) && job == &myjob) + determine_expensive_job(job); if ((job->flags & (JOB_SILENT | JOB_IS_EXPENSIVE)) == JOB_SILENT) printf(": %s", job->cmd); diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c index c248e7ff421..cf2828aeff8 100644 --- a/usr.bin/make/job.c +++ b/usr.bin/make/job.c @@ -1,4 +1,4 @@ -/* $OpenBSD: job.c,v 1.146 2020/01/04 16:16:37 espie Exp $ */ +/* $OpenBSD: job.c,v 1.147 2020/01/13 14:14:24 espie Exp $ */ /* $NetBSD: job.c,v 1.16 1996/11/06 17:59:08 christos Exp $ */ /* @@ -569,10 +569,10 @@ postprocess_job(Job *job) * is set, so jobs that would fork new processes are accumulated in the * heldJobs list instead. * - * This heuristics is also used on error exit: we display silent commands - * that failed, unless those ARE expensive commands: expensive commands - * are likely to not be failing by themselves, but to be the result of - * a cascade of failures in descendant makes. + * XXX This heuristics is also used on error exit: we display silent commands + * that failed, unless those ARE expensive commands: expensive commands are + * likely to not be failing by themselves, but to be the result of a cascade of + * failures in descendant makes. */ void determine_expensive_job(Job *job) |