I have a program that uses ansi terminal codes to do fancy stuff like erasing lines when it runs in the terminal. When that is run from within Emacs, it obviously screws up the buffer.
The program has an option to not use those, so I'd like to be able to turn on that option when running in a shell within Emacs.
I execute this program as a part of a Makefile, either from the terminal or using compile-mode in Emacs.
So is there a way to have compile-mode set an environment variable (or something similar) that would be easy to catch in the Makefile to use the option when appropriate?
Manually adding an extra argument to make in the make-command (in either of the cases) is what I am trying to avoid.