patchmake - Patches: patch #3519, Support for a progress bar for...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #3519: Support for a progress bar for long builds...

Submitter:  Dan Hirsch <thequux>
Submitted:  Sun 14 Nov 2004 05:36:36 AM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Wont Do Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Fixed Release:  None

Tue 27 Dec 2005 10:20:58 PM UTC, comment #3: 

As far as I can tell, your patch invokes make twice: once with -n and -s, to find out what would be created without actually doing anything, then again without those flags.  That could easily be done by a script or wrapper around GNU make, and doesn't have any need to be embedded in make.  The reason you're seeing bizarre behavior in some oddball cases is that "make -n" doesn't always do the same thing as "make", and in fact sometimes it can cause incorrect behavior (-n does not prevent make from building files that are needed in order to run the make itself, such as rebuilding makefiles, etc.)

You're right that counting the targets as they're started/completed is harder: the only way to do that today would be to modify each of your targets to do it: you could start your "watcher" script and have it create a named pipe, then have each target print a value to that pipe when it's finished for example.

I'm willing to entertain an enhancement request on the second matter: most likely I'd provide a special hook function that could be called before/after a target is invoked when we integrate our scripting language with GNU make.  However, the method provided by this patch isn't robust enough to consider making a permanent feature of GNU make.

Paul D. Smith <psmith>
Group administrator
Wed 22 Jun 2005 06:03:40 PM UTC, comment #2: 

Maybe I don't know make well enough, but I don't see any way to count the number of targets in a general way. Further, I cant see any way to count the number of updated targets without a patch in make itself. I you can siggest a way to do that, I would appreciate it. Still, this should not cause any compatibility issues.

Dan Hirsch <thequux>
Wed 22 Jun 2005 05:34:10 PM UTC, comment #1: 

I don't see why this method needs support inside make.  As far as I can tell it's just as easily implemented as a wrapper around make.

Paul D. Smith <psmith>
Group administrator
Sun 14 Nov 2004 05:36:36 AM UTC, original submission:  

I wanted a progress bar for long builds, like openoffice, GNOME, and X.Org, but I couldn't find anything beyond a command line. So, here's my patch for make-3.80. It adds a directory, $(prefix)/share/make, with one file in it, progress. This file is a shell script that runs Xdialog (it can be changed, of course) and displays a progress bar. A flag is added, -P, with no arguments that the user will use. There is an int argument that tells it what file descriptor to spew the progress information out on; this is optional and not mentioned in the --help output. The progress script takes dots on standard in, one for each target processed; the total number of targets is given by the total number of ascii bells in a file called .~count; I couldn't figure out how to stop make from printing directory names into the count file. Also, I took the liberty of redefining the '-n -s' flag combo to print out a dot for every target.

This patch fails on some makefiles, such as the Linux kernel; I have not fugured out why. Without the -P flag or the '-ns' combo, however, it works fine on all makefiles.

Dan Hirsch <thequux>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #8042:  make-3.80-dan.patch added by thequux (7KiB - text/x-patch - The patch describes above...)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 3 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-12-27 psmith StatusNone Wont Do
    Open/ClosedOpen Closed
2004-11-14 thequux Attached File- Added make-3.80-dan.patch, #3878

Back to the top

Powered by Savane 3.13-02a9.
Corresponding source code