Re: Colorized compiler/linker messages

2011-01-23 Thread Michael D. Norwick

On 01/22/2011 22:22, Robert Bonomi wrote:

 From owner-freebsd-questi...@freebsd.org  Sat Jan 22 20:10:21 2011
Date: Sat, 22 Jan 2011 20:00:52 -0600
From: Michael D. Norwickmnorw...@centurytel.net
To: freebsd-questions@freebsd.org
Subject: Colorized compiler/linker messages

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?
 

Whatever it is that is writing the messages is putting out 'terminal
control' character strings that specify the color.

   

Where does
one find what the various colors are supposed to signify?
 

Read the _complete_ documentation for 'whatever it is' that is producing
the messages.  The colors signify 'whatever it is' that the author of that
software chose to represent with that color.  There are *NO* universal
standards for such things.

   

Or, is it just
because it's more appealing?
 

(A) appealing is in the eye of the beholder.
(B) *why* 'somebody' did something/anything is known *only* to the party
 that actually _did_ it.  You can ether ask *them* or get uninformed
 speculation from third parties.

In broad, diagsnotic messages can be divided into a minimum of 4 'classes'
(finer gradation is always possible):
 diagnostic -- 'gory details' of what the program is doing internally, to
find out where what it is actually  doing is different from what one
'expects' it to be doing.
 informational -- things you might 'want to know about', but do not
indicate potentially incorrect operation.
 warning -- things which *probably* indicate a problem, but might be
'as intended'
 error -- something which is, without question, incorrect, and prevents
proper program operation.


A developer -might- use different colors for different 'classes' of messages,
so that an experienced user of that program (who 'knows' what color is used
for what) can tell 'at a glance' the  serverity of the thing being reported.
[ see (B), above, as regards applicability to -your- situationn ]



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


   
Sounds like you had a bad day yesterday.  I'm sorry,  I will try to scan 
any further e-mails for the appropriate intelligence.  Isn't that why 
it's called FreeBSD-questions and not ab...@freebsd.org?  And, yes, I 
read the docs.


Thank You,
Michael
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Colorized compiler/linker messages

2011-01-23 Thread Mark Johnston
On Sat, Jan 22, 2011 at 08:00:52PM -0600, 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?
 
 Thank You,
 
 Michael

I'm not sure about ebook specifically, but there's a wrapper for gcc called 
colorgcc which colorizes the diagnostics and errors that gcc emits. The idea is
that one can just do something like CC=colorgcc make when building.

I'm sure there are other programs out there that do something similar,
but colorgcc is the most common I think. Apparently there are similar
wrappers for make and diff as well.

-Mark
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Colorized compiler/linker messages

2011-01-23 Thread Michael D. Norwick

On 01/23/2011 17:07, Mark Johnston wrote:

On Sat, Jan 22, 2011 at 08:00:52PM -0600, 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?

Thank You,

Michael
 

I'm not sure about ebook specifically, but there's a wrapper for gcc called
colorgcc which colorizes the diagnostics and errors that gcc emits. The idea is
that one can just do something like CC=colorgcc make when building.

I'm sure there are other programs out there that do something similar,
but colorgcc is the most common I think. Apparently there are similar
wrappers for make and diff as well.

-Mark
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


   

Thank You,

I'll look up the man pages for colorgcc and see if it is installed on my 
system.  This explains a lot.


Michael
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Colorized compiler/linker messages

2011-01-22 Thread Michael D. Norwick

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?


Thank You,

Michael
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Colorized compiler/linker messages

2011-01-22 Thread Robert Bonomi
 From owner-freebsd-questi...@freebsd.org  Sat Jan 22 20:10:21 2011
 Date: Sat, 22 Jan 2011 20:00:52 -0600
 From: Michael D. Norwick mnorw...@centurytel.net
 To: freebsd-questions@freebsd.org
 Subject: Colorized compiler/linker messages

 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?

Whatever it is that is writing the messages is putting out 'terminal 
control' character strings that specify the color.

Where does 
 one find what the various colors are supposed to signify?

Read the _complete_ documentation for 'whatever it is' that is producing
the messages.  The colors signify 'whatever it is' that the author of that
software chose to represent with that color.  There are *NO* universal
standards for such things.

Or, is it just 
 because it's more appealing?

(A) appealing is in the eye of the beholder.
(B) *why* 'somebody' did something/anything is known *only* to the party
that actually _did_ it.  You can ether ask *them* or get uninformed
speculation from third parties.

In broad, diagsnotic messages can be divided into a minimum of 4 'classes'
(finer gradation is always possible):
diagnostic -- 'gory details' of what the program is doing internally, to 
   find out where what it is actually  doing is different from what one
   'expects' it to be doing.
informational -- things you might 'want to know about', but do not 
   indicate potentially incorrect operation.
warning -- things which *probably* indicate a problem, but might be
   'as intended'
error -- something which is, without question, incorrect, and prevents
   proper program operation.


A developer -might- use different colors for different 'classes' of messages,
so that an experienced user of that program (who 'knows' what color is used
for what) can tell 'at a glance' the  serverity of the thing being reported.
[ see (B), above, as regards applicability to -your- situationn ]



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Colorized compiler/linker messages

2011-01-22 Thread Charlie Kester

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.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org