diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2020-01-26 12:35:58 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2020-01-26 12:35:58 +0000 |
commit | 817bcabff5c24655844726121c76848d09758871 (patch) | |
tree | cf126ba03ede1f73cd1ad4d580d49b4517f50037 /usr.bin/make | |
parent | 4851cc933a59a041d38a6b8eb9679266b3736d71 (diff) |
simplify logic in compat engine, we can set ABORTED directly instead of
waiting for the father to do so.
okay millert@
Diffstat (limited to 'usr.bin/make')
-rw-r--r-- | usr.bin/make/compat.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/usr.bin/make/compat.c b/usr.bin/make/compat.c index 793a5d5632a..0676defa7e3 100644 --- a/usr.bin/make/compat.c +++ b/usr.bin/make/compat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: compat.c,v 1.91 2020/01/13 15:41:53 espie Exp $ */ +/* $OpenBSD: compat.c,v 1.92 2020/01/26 12:35:57 espie Exp $ */ /* $NetBSD: compat.c,v 1.14 1996/11/06 17:59:01 christos Exp $ */ /* @@ -116,9 +116,7 @@ CompatMake(void *gnp, /* The node to make */ * transformations the suffix module thinks are necessary. * Once that's done, we can descend and make all our children. * If any of them has an error but the -k flag was given, - * our 'must_make' field will be set false again. This is our - * signal to not attempt to do anything but abort our - * parent as well. */ + * we will abort. */ gn->must_make = true; gn->built_status = BUILDING; /* note that, in case we have siblings, we only check all @@ -132,10 +130,9 @@ CompatMake(void *gnp, /* The node to make */ sib = sib->sibling; } while (sib != gn); - if (!gn->must_make) { + if (gn->built_status == ABORTED) { Error("Build for %s aborted", gn->name); - gn->built_status = ABORTED; - pgn->must_make = false; + pgn->built_status = ABORTED; return; } @@ -233,7 +230,7 @@ CompatMake(void *gnp, /* The node to make */ Make_TimeStamp(pgn, gn); } } else if (keepgoing) - pgn->must_make = false; + pgn->built_status = ABORTED; else { print_errors(); exit(1); @@ -242,12 +239,12 @@ CompatMake(void *gnp, /* The node to make */ case ERROR: /* Already had an error when making this beastie. Tell the * parent to abort. */ - pgn->must_make = false; + pgn->built_status = ABORTED; break; case BUILDING: Error("Graph cycles through %s", gn->name); gn->built_status = ERROR; - pgn->must_make = false; + pgn->built_status = ABORTED; break; case REBUILT: if ((gn->type & OP_EXEC) == 0) { |