* main.c, NEWS, doc/make.text: Rename MAKE_TTY* to MAKE_TERM*

This commit is contained in:
Paul Smith 2014-09-15 09:30:40 -04:00
parent 7f9ce6e97b
commit 9a2451af0b
3 changed files with 14 additions and 11 deletions

5
NEWS
View file

@ -15,8 +15,9 @@ A complete list of bugs fixed in this version is available here:
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

View file

@ -6321,13 +6321,13 @@ will contain the number of times this instance has restarted. Note
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

10
main.c
View file

@ -1400,12 +1400,14 @@ main (int argc, char **argv, char **envp)
/* 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. */