Make process title - % complete

Adrian Penisoara ady at freebsd.ady.ro
Tue Oct 20 12:49:16 UTC 2009


Hi,

On Mon, Oct 19, 2009 at 4:40 PM, Ivan Voras <ivoras at freebsd.org> wrote:
> Ivan Voras wrote:
>>
>> I have a small patch that makes "make" display percentage complete in
>> process title, which can be retrieved in "top" in the form of:
>>
>> 71466 root             1  76    0  7008K  5696K select  0   0:00  0.00%
>> make: 95% (55 more targets out of 1360) (make)
>
> Also: is there someone here more familiar with "make" who can tell me if the
> "current" top level target (i.e. the one taken from the command line) is
> kept track of somewhere? For example "clean" in "make clean install".
>

gmake does show the nesting level in its output and indeed it's a
valuable information if setproctitle is to be used...

gmake appears to use a MAKELEVEL environment variable to keep track in
between parent/child runs. I see a similar mechanism in our make
(using the __MKLVL__ environment variable) but it's restricted only to
the check_make_level() function that is checking the nesting level,
thus no global variable is available to use.

Regards,
Adrian Penisoara
EnterpriseBSD.com


More information about the freebsd-hackers mailing list