bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fwd: isatty function?]


From: mst
Subject: [Fwd: isatty function?]
Date: Mon, 09 Sep 2002 23:14:02 +0200
User-agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.1) Gecko/20020826


--- Begin Message --- Subject: isatty function? Date: Thu, 05 Sep 2002 23:21:18 +0200 User-agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.1) Gecko/20020826
Hello!
It turns out that there's no easy way, now, to determine inside the makefile
whether the output is to tty or now.
the simple $(shell perl -e 'print 1 if (-t STDOUT)')
does not work, since anything inside a shell is sending output
to shell and not to tty!
I ended up doing this:
.PHONE: isatty.mak
include isatty.mak
isatty.mak:
    @perl -e 'print "isatty:=",(-t STDOUT),"\n"' > $@


and this works but it forces an extra evaluation of makefile
and seems too complicated for a simple thing like that ...

How about a nwe function $(isatty [n]) - like isatty on file n?

Sounds OK?
MST



--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]