From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 20 12:49:15 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F269D106566C for ; Tue, 20 Oct 2009 12:49:15 +0000 (UTC) (envelope-from ady@ady.ro) Received: from mail-ew0-f206.google.com (mail-ew0-f206.google.com [209.85.219.206]) by mx1.freebsd.org (Postfix) with ESMTP id 6E8CF8FC0C for ; Tue, 20 Oct 2009 12:49:15 +0000 (UTC) Received: by ewy2 with SMTP id 2so5103006ewy.7 for ; Tue, 20 Oct 2009 05:49:14 -0700 (PDT) MIME-Version: 1.0 Sender: ady@ady.ro Received: by 10.210.152.4 with SMTP id z4mr7189920ebd.7.1256042954291; Tue, 20 Oct 2009 05:49:14 -0700 (PDT) In-Reply-To: References: From: Adrian Penisoara Date: Tue, 20 Oct 2009 14:48:54 +0200 X-Google-Sender-Auth: 39eb26c2cb6ffb4a Message-ID: <78cb3d3f0910200548p60fd32e5tc525899391e37f41@mail.gmail.com> To: Ivan Voras Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: Make process title - % complete X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Oct 2009 12:49:16 -0000 Hi, On Mon, Oct 19, 2009 at 4:40 PM, Ivan Voras 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