--- src/usr.bin/make/make.c 2005/05/23 18:26:25 1.27 +++ src/usr.bin/make/make.c 2005/05/23 20:04:04 1.28 @@ -720,6 +720,19 @@ Make_Run(Lst *targs, Boolean queryFlag) int errors; /* Number of errors the Job module reports */ LstNode *ln; + /* + * Initialize job module before traversing + * the graph, now that any .BEGIN and .END + * targets have been read. This is done + * only if the -q flag wasn't given (to + * prevent the .BEGIN from being executed + * should it exist). + */ + if (!queryFlag) { + Job_Init(jobLimit); + jobsRunning = TRUE; + } + Lst_Init(&examine); Lst_Duplicate(&examine, targs, NOCOPY); numNodes = 0;