=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/make.c,v retrieving revision 1.80 retrieving revision 1.81 diff -c -r1.80 -r1.81 *** src/usr.bin/make/make.c 2020/01/13 15:24:31 1.80 --- src/usr.bin/make/make.c 2020/01/13 15:41:53 1.81 *************** *** 1,4 **** ! /* $OpenBSD: make.c,v 1.80 2020/01/13 15:24:31 espie Exp $ */ /* $NetBSD: make.c,v 1.10 1996/11/06 17:59:15 christos Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: make.c,v 1.81 2020/01/13 15:41:53 espie Exp $ */ /* $NetBSD: make.c,v 1.10 1996/11/06 17:59:15 christos Exp $ */ /* *************** *** 511,516 **** --- 511,526 ---- randomize_garray(&to_build); } + void + Make_Init() + { + /* wild guess at initial sizes */ + Array_Init(&to_build, 500); + Array_Init(&examine, 150); + Array_Init(&heldBack, 100); + ohash_init(&targets, 10, &gnode_info); + } + /*- *----------------------------------------------------------------------- * Make_Run -- *************** *** 523,547 **** * calling on MakeStartJobs to keep the job table as full as * possible. * - * Results: - * true if work was done. false otherwise. - * * Side Effects: * The must_make field of all nodes involved in the creation of the given * targets is set to 1. The to_build list is set to contain all the * 'leaves' of these subgraphs. *----------------------------------------------------------------------- */ ! bool ! Make_Run(Lst targs) /* the initial list of targets */ { - bool problem; /* errors occurred */ - - /* wild guess at initial sizes */ - Array_Init(&to_build, 500); - Array_Init(&examine, 150); - Array_Init(&heldBack, 100); - ohash_init(&targets, 10, &gnode_info); if (DEBUG(PARALLEL)) random_setup(); --- 533,547 ---- * calling on MakeStartJobs to keep the job table as full as * possible. * * Side Effects: * The must_make field of all nodes involved in the creation of the given * targets is set to 1. The to_build list is set to contain all the * 'leaves' of these subgraphs. *----------------------------------------------------------------------- */ ! void ! Make_Run(Lst targs, bool *has_errors, bool *out_of_date) { if (DEBUG(PARALLEL)) random_setup(); *************** *** 552,558 **** * the next loop... (we won't actually start any, of course, * this is just to see if any of the targets was out of date) */ ! return MakeStartJobs(); } else { /* * Initialization. At the moment, no jobs are running and until --- 552,559 ---- * the next loop... (we won't actually start any, of course, * this is just to see if any of the targets was out of date) */ ! if (MakeStartJobs()) ! *out_of_date = true; } else { /* * Initialization. At the moment, no jobs are running and until *************** *** 579,586 **** (void)MakeStartJobs(); } ! if (!queryFlag) ! problem = Job_Finish(); /* * Print the final status of each target. E.g. if it wasn't made --- 580,587 ---- (void)MakeStartJobs(); } ! if (errorJobs != NULL) ! *has_errors = true; /* * Print the final status of each target. E.g. if it wasn't made *************** *** 588,600 **** */ if (targets_contain_cycles()) { break_and_print_cycles(targs); ! problem = true; } Lst_Every(targs, MakePrintStatus); - if (problem) - Fatal("Errors while building"); - - return true; } /* round-about detection: assume make is bug-free, if there are targets --- 589,597 ---- */ if (targets_contain_cycles()) { break_and_print_cycles(targs); ! *has_errors = true; } Lst_Every(targs, MakePrintStatus); } /* round-about detection: assume make is bug-free, if there are targets