%% mst <[EMAIL PROTECTED]> writes: m> It turns out that there's no easy way, now, to determine inside the m> makefile whether the output is to tty or now.
m> the simple $(shell perl -e 'print 1 if (-t STDOUT)') m> does not work, since anything inside a shell is sending output m> to shell and not to tty! m> I ended up doing this: m> .PHONE: isatty.mak m> include isatty.mak m> isatty.mak: m> @perl -e 'print "isatty:=",(-t STDOUT),"\n"' > $@ m> and this works but it forces an extra evaluation of makefile m> and seems too complicated for a simple thing like that ... m> How about a nwe function $(isatty [n]) - like isatty on file n? Hmm. This is an extremely rare situation--I think this is the first time anyone has asked for it. Unfortunately I don't think this is appropriate for a new function in GNU make: it's too rarely needed and it's _very_ system specific (what would that function do on a VMS system, or an Amiga system?) In the future we will be integrating a scripting language with GNU make, to provide a much richer set of function capabilities (this is one main reason I don't want to add too many new functions). Hopefully that language will have facilities for testing this. Thanks for the request... -- ------------------------------------------------------------------------------- Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at: http://www.gnu.org http://make.paulandlesley.org "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Bug-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-make