Index: make.c =================================================================== --- make.c (revision 198230) +++ make.c (working copy) @@ -73,6 +73,8 @@ */ #include +#include +#include #include "arch.h" #include "config.h" @@ -730,6 +732,8 @@ GNode *cgn; Lst examine; /* List of targets to examine */ LstNode *ln; + char titleBuf[256], titleBufAux[256]; + int startNumNodes; Lst_Init(&examine); Lst_Duplicate(&examine, targs, NOCOPY); @@ -772,6 +776,7 @@ } } } + startNumNodes = numNodes; if (queryFlag) { /* @@ -803,6 +808,15 @@ * the keepgoing flag was given. */ while (!Job_Empty()) { + snprintf(titleBuf, 256, "%d%% (%d more targets out of %d)", + (int)( 100.0f - (float)numNodes / startNumNodes * 100.0f), + numNodes, startNumNodes); + if (makeErrors != 0) + snprintf(titleBufAux, 256, ", %d errors", makeErrors); + else + titleBufAux[0] = '\0'; + setproctitle("%s%s", titleBuf, titleBufAux); + Job_CatchOutput(!Lst_IsEmpty(&toBeMade)); Job_CatchChildren(!usePipes); MakeStartJobs();