The convoluted logic that resets must_make does not make any sense to me. It's just as simple to set built_status to ABORTED directly.
Note that in the compat make case, there are two instances of using must_make left, one in arch.c, which I have yet to understand, and one in node_failure/list_parents. diff --git a/compat.c b/compat.c index fd78d78..9173f44 100644 --- a/compat.c +++ b/compat.c @@ -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) {