Pretty Make

Beautify your make output!


by Philippe Fremy

Program

Pretty make is a very small python script that will organise and colorize your make output. I have written this because when compiling, I was sick of the endless lines of uninteresting options, which were hiding the gcc options I was looking for.

The program analyses its specific options then runs make with all the other options. So it is compatible with make. I use it every week to compile KDE with alias make='pretty_make.py'. I use the escape codes to colorize the output.

People have been wondering about CPU usage. Starting the python interpreter takes a little CPU, but this is before you have started your compilation, so you sill have plenty of CPU anyway. The python interpreter is started only once for a make command, so it won't matter much in you overall compilation speed.
Now, the parsing of the line uses builting python functions, which are written in C. So this is fast and there is really not a lot of work: split the line, compare beginning of words, fill lists, display. And such a line is displayed when gcc choose a new file to compile, so the tiny amount of CPU taken would have probably not been used anyway (except if you use -j12) because gcc was still loading the files at that time. When I compile, python doesn't make into 'top', so it effectively does not take CPU.

Features

All features are of course configurable. The default options you might want to alter are at the beginning of the program. There is no need to know python to modify them.

Screenshot

Before After
Before pretty-make After pretty-make


Download & Install

20/07/2003 1.3 pretty make add more compiler names
add a debug option
handles properly argument with spaces inside can now compile kernel without problems
02/04/2002 1.2 pretty_make Argument -- passes all the remaining arguments to make (pretty-make.py -- --help yields make's help)
Transparancy in konsole is preserved when not altering background color.
Fix for arguments of type "arg=foo" that were not passed to make
Fix for keyboard interruption (^C) would leave the make running wild in the background
26/03/2002 1.1 pretty_make Fixes for tcsh users
Improvements from Adrian Thurston
17/03/2002 1.0 pretty make Initial release

Many way to use it:

Red Hat users, be warned: pretty make won't run on your system, because recent Red Hat distributions ship with an old version of python, python 1.5.2, which is not supported by pretty_make. It is amazing that RedHat ships with such an old version of python. It is now three years old and python has seen 8 stable releases since 1.5.2. This is one more reason for me not to use RedHat. Mandrake and Suse don't have this problem, and I think Debian doesn't too. If you want to run pretty_make, you need to upgrade your version of python.

Feedback

Bugs, suggestions, patch, I am open to feedback: phil at freehackers dot org

Other programs

Pretty make doesn't use these program but you may want to check them if you like coloured output.





Last modification : $Date: 2006/10/19 12:34:39 $ - $Author: philippe $