make-w32
[Top][All Lists]
Advanced

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

Re: make 3.81 MinGW port and testsuite working with MSYS


From: Alessandro Vesely
Subject: Re: make 3.81 MinGW port and testsuite working with MSYS
Date: Mon, 28 Feb 2005 09:32:59 +0100

"Paul D. Smith" wrote:
> 
>   >> It won't work on a win32 perl, because of the `2>&1'. Of course,
>   >> we need a unixy shell to run the tests, but AFAIK there's no way
>   >> to let perl also use it.
> 
>   ez> Really?  Can't you run the command via sh.exe explicitly, i.e. use the
>   ez> command
> 
>   ez>     sh -c "WHATEVER 2>&1"

Yup, this works, but is redundant if using attach/detach _default_output.
(On ActivePerl, stdio and stderr will not be synchronized anyway)
Curiously, `sh -c "WHATEVER 2>&1 > $filename"' does not redirect as expected.

>   ez> ?  (Note that the redirection must be inside the quotes, so that sh
>   ez> interprets it.)  I'd expect this to DTRT even on Windows.
> 
> Alessandro's point is that my suggested "improvement" is using Perl's
> open() with a pipe and redirection rather than using system, so no shell
> would be invoked.

ActivePerl invokes command.com when opening the pipe: I get its "comando
o nome di file non valido" (invalid command or filename) message. The man
page mentions it does so when it finds shell characters, much like GNU make.
 
> I was assuming that since redirection in an open() call is documented by
> Perl, that Perl would handle that itself rather than relying on the
> shell to implement it.  I guess not :-/.

I sent you that patch to suggest an alternate place where output adjustments
might take place. (Yes, it also shouldn't be in the generic driver. Perhaps
that function should call back into a make-specific output_adjustments_stuff
for that: That way the testsuite may be adjusted to only produce warnings on
minor failures and allow concentrating on relevant ones.)

Yet another alternative, only for cr/lf, is using binmode...




reply via email to

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