http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=105&set=custom
-* New variables: $(MAKE_TTYOUT) and $(MAKE_TTYERR) are set if stdout or
- stderr, respectively, are believed to be writing to a terminal.
+* New variables: $(MAKE_TERMOUT) and $(MAKE_TERMERR) are set if stdout or
+ stderr, respectively, are believed to be writing to a terminal. These
+ variables are exported by default.
* Allow a no-text-argument form of the $(file ...) function. Without a text
argument nothing is written to the file: it is simply opened in the
this is not the same as recursion (counted by the @code{MAKELEVEL}
variable). You should not set, modify, or export this variable.
-@vindex MAKE_TTYOUT @r{(whether stdout is a terminal)}
-@vindex MAKE_TTYERR @r{(whether stderr is a terminal)}
-@item MAKE_TTYOUT
-@itemx MAKE_TTYERR
+@vindex MAKE_TERMOUT @r{(whether stdout is a terminal)}
+@vindex MAKE_TERMERR @r{(whether stderr is a terminal)}
+@item MAKE_TERMOUT
+@itemx MAKE_TERMERR
When @code{make} starts it will check whether stdout and stderr will
show their output on a terminal. If so, it will set
-@code{MAKE_TTYOUT} and @code{MAKE_TTYERR}, respectively, to the name
+@code{MAKE_TERMOUT} and @code{MAKE_TERMERR}, respectively, to the name
of the terminal device (or @code{true} if this cannot be determined).
If set these variables will be marked for export. These variables
will not be changed by @code{make} and they will not be modified if
/* Set a variable specifying whether stdout/stdin is hooked to a TTY. */
#ifdef HAVE_ISATTY
if (isatty (fileno (stdout)))
- define_variable_cname ("MAKE_TTYOUT", TTYNAME (fileno (stdout)),
- o_default, 0)->export = v_export;
+ if (! lookup_variable (STRING_SIZE_TUPLE ("MAKE_TERMOUT")))
+ define_variable_cname ("MAKE_TERMOUT", TTYNAME (fileno (stdout)),
+ o_default, 0)->export = v_export;
if (isatty (fileno (stderr)))
- define_variable_cname ("MAKE_TTYERR", TTYNAME (fileno (stderr)),
- o_default, 0)->export = v_export;
+ if (! lookup_variable (STRING_SIZE_TUPLE ("MAKE_TERMERR")))
+ define_variable_cname ("MAKE_TERMERR", TTYNAME (fileno (stderr)),
+ o_default, 0)->export = v_export;
#endif
/* Reset in case the switches changed our minds. */