[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rfc] Colorized output for GNU make?
From: |
Sebastian Pipping |
Subject: |
Re: [rfc] Colorized output for GNU make? |
Date: |
Thu, 20 Oct 2011 20:19:33 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20111020 Thunderbird/7.0.1 |
Hello again!
I have some new code ready for you to tear apart, err review :-)
I have re-written the patch so that version 2 at [1] does the following:
- Add parameter --color[=(yes|no)] to enable/disable color
from the command line. Minimal man page entry added, too.
- Integrate colorization into
- internal functions
- message()
- error()
- fatal()
- echo of commands being executed
- directory changes
- Integrate two new files output.h and output.c into
build system files.
The approach used is to have a general printing function that all output
passes through. A message type and a bunch of flags control details of
behavior, for instance if the output goes to stdout or stderr. This is
the current types and flags:
typedef enum _message_t {
OT_DIR_ENTER,
OT_DIR_LEAVE,
OT_MISC_MESSAGE,
OT_MISC_ERROR,
OT_MISC_FATAL,
OT_EXECUTION
} message_t;
enum {
OF_APPEND_NEWLINE = 0x1,
OF_PREPEND_PREFIX = 0x2,
OF_FLUSH = 0x4
};
Color codes are used _inside_ that function, only.
I'm looking forward to your feedback!
Best,
Sebastian
[1] http://hartwork.org/public/make-CVS-color-v2.patch
- Re: [rfc] Colorized output for GNU make?, Sebastian Pipping, 2011/10/03
- Re: [rfc] Colorized output for GNU make?, Tim Murphy, 2011/10/03
- Re: [rfc] Colorized output for GNU make?, Sebastian Pipping, 2011/10/10
- Re: [rfc] Colorized output for GNU make?, Paul Smith, 2011/10/11
- Re: [rfc] Colorized output for GNU make?, Sebastian Pipping, 2011/10/11
- Re: [rfc] Colorized output for GNU make?, Eli Zaretskii, 2011/10/11
- Re: [rfc] Colorized output for GNU make?, Paul Smith, 2011/10/11
- Re: [rfc] Colorized output for GNU make?,
Sebastian Pipping <=
- Re: [rfc] Colorized output for GNU make?, Eli Zaretskii, 2011/10/20
- Re: [rfc] Colorized output for GNU make?, Sebastian Pipping, 2011/10/20
- Re: [rfc] Colorized output for GNU make?, Eli Zaretskii, 2011/10/20
- Re: [rfc] Colorized output for GNU make?, David Boyce, 2011/10/20
- Re: [rfc] Colorized output for GNU make?, Sebastian Pipping, 2011/10/20
- Re: [rfc] Colorized output for GNU make?, Sebastian Pipping, 2011/10/21
- Re: [rfc] Colorized output for GNU make?, Sebastian Pipping, 2011/10/19
- Re: [rfc] Colorized output for GNU make?, Sebastian Pipping, 2011/10/19
- Re: [rfc] Colorized output for GNU make?, Paul Smith, 2011/10/20
- Re: [rfc] Colorized output for GNU make?, Sebastian Pipping, 2011/10/20