mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 17:33:38 +00:00
compiler/mercury_compile_main.m:
If this new environment variable is set to always/never/1/0,
then enable or disable the use of color as directed. Do this regardless
of the setting of the NO_COLOR environment variable, since NO_COLOR
is a general setting while MERCURY_ENABLE_COLOR is a specific setting.
NO_COLOR is still consulted if MERCURY_ENABLE_COLOR is either not set,
or is set to a value we don't recognize.
compiler/globals.m:
Now that color diagnostics can be disabled using this new purpose-specific
envvar, stop taking an "" or "none" value of the MERCURY_COLOR_SCHEME
envvar as a request to disable colors in diagnostics.
compiler/options.m:
Shorten the name of the --enable-color-diagnostics option to just
--color-diagnostics.
compiler/handle_options.m:
Conform to the changes above.
tools/bootcheck:
Set MERCURY_ENABLE_COLOR to "always". Delete the unset of NO_COLOR,
since it should not be needed.
tests/invalid/Mmakefile:
tests/invalid_make_int/Mmakefile:
tests/invalid_nodepend/Mmakefile:
tests/invalid_onlydepend/Mmakefile:
tests/invalid_purity/Mmakefile:
tests/invalid_submodules/Mmakefile:
tests/recompilation/Mmakefile:
tests/warnings/Mmakefile:
Update the references to ---enable-color-diagnostics. Bootchecks would
work even if we deleted them, but keeping them slightly simplifies
running the tests outside of bootcheck.
40 lines
1.0 KiB
Makefile
40 lines
1.0 KiB
Makefile
#-----------------------------------------------------------------------------#
|
|
# vim: ts=8 sw=8 noexpandtab ft=make
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
TESTS_DIR = ..
|
|
THIS_DIR = invalid_onlydepend
|
|
MAYBE_J1 =
|
|
|
|
PROGS = \
|
|
bad_module_name
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
TESTS = $(sort $(PROGS:%=%-nodepend))
|
|
include ../Mmake.common
|
|
|
|
# Module-specific options should go in Mercury.options so they can be found
|
|
# by `mmc --make'.
|
|
include Mercury.options
|
|
|
|
MCFLAGS += --color-diagnostics
|
|
|
|
%.runtest: %.err_res ;
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
$(PROGS:%=%.err): %.err: %.m
|
|
if $(MC) $(ALL_GRADEFLAGS) $(ALL_MCFLAGS) --generate-dependencies \
|
|
$* > $*.err 2>&1; \
|
|
then false; \
|
|
else true; \
|
|
fi
|
|
|
|
clean_local: clean_invalid_onlydepend
|
|
|
|
clean_invalid_onlydepend:
|
|
rm -f *.dep_err *.err *.err_res *.err_res[2345]
|
|
|
|
#-----------------------------------------------------------------------------#
|