ocaml/driver
Hannes Mehnert 76bf7c568e Respect OCAML_COLOR environment variable for deciding whether to use colors
Since 4.03, OCaml supports coloring its messages to standard output and standard
error, depending on the "-color" argument ({always,never,auto}).  This commit
adds support for the environment variable "OCAML_COLOR" (which value can as well
be {always,never,auto}).

The command line argument "-color" takes precedence, "OCAML_COLOR" is only
taken into consideration if no "-color" is provided.

The motivation for this is that the user should have control over coloring
OCaml's output messages.  OCamlbuild, a widely used build tool executes OCaml
not under a tty (and OCaml does not colorize errors and warnings), which lead
various packages use `color(always)` in their `_tags` files, which breaks with
other (non-interactive) programs (i.e.  editor helpers).

Further discussion was done at https://github.com/ocaml/ocamlbuild/issues/87 and
https://github.com/ocaml/ocaml/pull/1098.
2017-03-15 08:24:13 +00:00
..
compdynlink.mlno Add plugins in the compiler 2016-07-18 17:43:05 +02:00
compenv.ml Respect OCAML_COLOR environment variable for deciding whether to use colors 2017-03-15 08:24:13 +00:00
compenv.mli Fix order of arguments with -cclib XXX (#761) 2016-12-14 13:14:21 +00:00
compile.ml display the output of -dtimings as a hierarchy 2017-03-07 15:43:57 -05:00
compile.mli Fix order of arguments with -cclib XXX (#761) 2016-12-14 13:14:21 +00:00
compmisc.ml Respect OCAML_COLOR environment variable for deciding whether to use colors 2017-03-15 08:24:13 +00:00
compmisc.mli Respect OCAML_COLOR environment variable for deciding whether to use colors 2017-03-15 08:24:13 +00:00
compplugin.ml Add plugins in the compiler 2016-07-18 17:43:05 +02:00
compplugin.mli Add plugins in the compiler 2016-07-18 17:43:05 +02:00
errors.ml Update headers for the new license. 2016-02-18 16:59:16 +01:00
errors.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
main.ml Respect OCAML_COLOR environment variable for deciding whether to use colors 2017-03-15 08:24:13 +00:00
main.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
main_args.ml Initial import of linear-scan-register-allocator 2017-02-22 17:09:18 +01:00
main_args.mli Initial import of linear-scan-register-allocator 2017-02-22 17:09:18 +01:00
ocamlcomp.sh.in Update headers for the new license. 2016-02-18 16:59:16 +01:00
optcompile.ml display the output of -dtimings as a hierarchy 2017-03-07 15:43:57 -05:00
optcompile.mli Fix order of arguments with -cclib XXX (#761) 2016-12-14 13:14:21 +00:00
opterrors.ml Update headers for the new license. 2016-02-18 16:59:16 +01:00
opterrors.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
optmain.ml Respect OCAML_COLOR environment variable for deciding whether to use colors 2017-03-15 08:24:13 +00:00
optmain.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
pparse.ml Merge pull request #862 from gasche/PR7037-input_name-in-Pparse 2017-03-08 07:41:15 -05:00
pparse.mli Add hooks on some compilation phases 2016-07-12 17:59:58 +02:00