make - Patches: patch #6911, Ability to detect interactive...
You are not allowed to post comments on this tracker with your current authentication level.
patch #6911: Ability to detect interactive shell (isatty())
Submitter: | Mark <mtrinh> | ||
Submitted: | Tue 08 Sep 2009 04:46:16 PM UTC | ||
Category: | None | Priority: | 5 - Normal |
Status: | Done | Privacy: | Public |
Assigned to: | psmith | Open/Closed: | Closed |
Fixed Release: | 4.1 |
Sat 04 Jan 2020 12:24:18 PM UTC, comment #4: |
Paul D. Smith <psmith> |
Sun 13 Sep 2009 07:02:55 PM UTC, comment #3: sorry, it should be like this:
|
Mark <mtrinh> |
Sun 13 Sep 2009 05:00:23 PM UTC, comment #2: It's useful when we are outputting colors in the terminal during a build. For example, the below code would only output colors when it is in an interactive terminal. If you redirect the output to a file, then it wont output the escape characters in your file. (not sure if the "ifeq" statement is written correctly. :) Hope this helps.
|
Mark <mtrinh> |
Sat 12 Sep 2009 10:35:59 PM UTC, comment #1: Can you give me some idea of why this is useful information / what it's useful for? Thanks! |
Paul D. Smith <psmith> |
Tue 08 Sep 2009 04:46:16 PM UTC, original submission:
There are times where I need to figure out if the current shell is interactive or not. This patch introduces an environment macro called MAKE_ISATTY, which returns either a 1 or 0.
|
Mark <mtrinh> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 5 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2020-01-04 | psmith | Status | None | Done | |
Assigned to | None | psmith | |||
Open/Closed | Open | Closed | |||
Fixed Release | None | 4.1 | |||
2009-09-08 | mtrinh | Attached File | - | Added tty.patch, #18689 |
Powered by Savane 3.13-3230.
Corresponding source code
As of GNU make 4.1, there's a make variable MAKE_TERMOUT which will be empty if stdout is NOT a terminal, or non-empty if stdout IS a terminal.