diff --git a/Terminal.c b/Terminal.c index 4dd246148c507a6fe9dd6beaa0a3a3835e5c9b3f..c9515ee7d0e5d30f699665c0087169570f634222 100644 --- a/Terminal.c +++ b/Terminal.c @@ -172,6 +172,14 @@ static int kwsysTerminalStreamIsVT100(FILE* stream, int default_vt100, } } + /* GNU make 4.1+ may tell us that its output is destined for a TTY. */ + { + const char* termout = getenv("MAKE_TERMOUT"); + if (termout && *termout != '\0') { + return 1; + } + } + /* If running inside emacs the terminal is not VT100. Some emacs seem to claim the TERM is xterm even though they do not support VT100 escapes. */