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

_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to