Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Oct 2009 14:48:54 +0200
From:      Adrian Penisoara <ady@freebsd.ady.ro>
To:        Ivan Voras <ivoras@freebsd.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Make process title - % complete
Message-ID:  <78cb3d3f0910200548p60fd32e5tc525899391e37f41@mail.gmail.com>
In-Reply-To: <hbhton$sb$1@ger.gmane.org>
References:  <hbhquj$mkj$1@ger.gmane.org> <hbhton$sb$1@ger.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On Mon, Oct 19, 2009 at 4:40 PM, Ivan Voras <ivoras@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 =A0 =A0 =A0 =A0 =A0 =A0 1 =A076 =A0 =A00 =A07008K =A05696K se=
lect =A00 =A0 0:00 =A00.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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?78cb3d3f0910200548p60fd32e5tc525899391e37f41>