[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Terminal escape sequences from configure/make test

Hallvard B Furuseth wrote:
The terminal escape sequences from 'make test >&outfile' can be a bit
annoying.  It's not hard to say 'TERM=dumb make test >&outfile', but
I forget it now and then.

I'd like to wrap the code to find terminal escape sequences in configure
and 'make test' in 'if test -t 1', which checks if file descriptor 1
goes to a terminal.

However, I'm unsure how portable 'test -t' is.  'test -t 1 2>/dev/null'
would be safe, but then only systems that support 'test -t' get escape
sequences.  Comments?
A quick survey of HPUX, AIX, and Solaris show they all support it; it has probably been around for quite some time. I don't have my 4.2BSD manuals handy at the moment but I'd bet it was supported there too.

 -- Howard Chu
 Chief Architect, Symas Corp.  http://www.symas.com
 Director, Highland Sun        http://highlandsun.com/hyc
 OpenLDAP Core Team            http://www.openldap.org/project/