* main.c, NEWS, doc/make.text: Rename MAKE_TTY* to MAKE_TERM*
authorPaul Smith <psmith@gnu.org>
Mon, 15 Sep 2014 13:30:40 +0000 (09:30 -0400)
committerPaul Smith <psmith@gnu.org>
Mon, 15 Sep 2014 13:30:40 +0000 (09:30 -0400)
NEWS
doc/make.texi
main.c

diff --git a/NEWS b/NEWS
index c39485052d604d2678458f275f62bd79cbe715ea..e82662315844e119c84a1f3c2f424315cc37130c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -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
index 3a873d7a5cc192e70407fc145138a033d6e3feec..15da9ba3b686b222769f9e0811aa47bce96287a3 100644 (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
diff --git a/main.c b/main.c
index 4a79b60f7913c0a1c2c9797e58e59f376f5f3545..09fb1fb1a387c7d40cf760f1d4a5962a6762a1b2 100644 (file)
--- a/main.c
+++ b/main.c
@@ -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.  */