Hi,
Janek has just pushed newer (still development, though) version of my patch
to dev/frax/colorful-make branch. It is almost completely rewritten and
greatly simplified, and fixes several mentioned issues. I'd be happy if you
give it a try and share with your feedback.

Especially if you've tried the previous version and encountered some
problems, please check whether they are fixed. In particular, color codes
should work much better now.

I believe that these changes, with some more documentation added, will make
maintaining this patch easy and almost no-cost, and keep it very easy to
remove(with just few simple sed replacements) or turn off. David, Phil, Jan
- do you think that it makes it more acceptable?

Main differences:
- all logic was moved to make/fancy-printing.make,
- colors got simplified - however it is possible to easily differentiate
style of different descriptions, default configuration has only 3 styles:
for program name (e.g. g++), for file names, and for rest of descriptions.
- printing descriptions inside rules is in almost all cases is as simply as
writing:
    $(call PRINT_SMART_DESC,<used program name>)
  or
    $(call PRINT_GENERIC_DESC,<description>,<optional file name>)
  or just
    $(call PRINT_SMART_DESC).
  No need to specify what action is done - it is deduced from program name.
- echo was changed to printf - possibly it should fix some problems with
color codes
- using color codes is now restricted to printing on terminal. While
redirecting to file/pipe, they won't be used.
- it is possible to turn echoing back on, with make option VERBOSE_MAKE
- it is possible to turn metafont output back on, with make option
VERBOSE_METAFONT (was possible before as well)
- it is possible to turn off "smart" descriptions with option
NO_FANCY_PRINTING (which implies VERBOSE_MAKE). Used together with
VERBOSE_METAFONT is equivalent to not using this patch at all.
- it is possible to completely turn off color codes with make NO_COLOR
option.

Options VERBOSE_MAKE, VERBOSE_METAFONT, NO_FANCY_PRINTING and NO_COLOR are
checked for beeing non-empty strings (this is how make's $(if) works), so
turning them on means giving them non-empty values (like $make
VERBOSE_MAKE=1).

Still pending:
- hiding some more rules,
- making some descriptions more meaningful,
- possibly removing all @-echo-suppressing in favour of .SILENT rule,
- testing,
- probably much more.

Btw, I recommend trying it together with Janek's building script - that
make building Lilypond easy and clear process. You will find it here:
https://github.com/janek-warchol/cli-tools/blob/master/lilypond/build-lily.sh
All necessary information about usage is in script's help.

Greetings,
Franek
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to