Colorized compiler/linker messages

Charlie Kester corky1951 at comcast.net
Sun Jan 23 05:01:37 UTC 2011


On Sat 22 Jan 2011 at 18:00:52 PST Michael D. Norwick wrote:
>Good Day,
>
>I have seen this for some time when building ports and was wondering how 
>it was done.  GCC when compiling and linking certain programs, ebook for 
>example, emits messages in various colors.  How is that done?  Where 
>does one find what the various colors are supposed to signify?  Or, is
>it just because it's more appealing?

CMake can be used to generate Makefiles that produce colorized output,
and I would wager that it's being used by most of the ports where you're
seeing color. 

But there are many tools a developer might use for this.  For example, I
found this in my bookmarks file:

http://phil.freehackers.org/pretty-make/index.html

I think it's mostly aesthetics, but some people claim that using
different colors for different build steps makes it easier to monitor
the progress of the build.  For example, if the link or install steps
are a different color than the configuration or compile steps, you can
see that the build is in its final stages even if you're on the other
side of the room.


More information about the freebsd-questions mailing list