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: Paul D. Smith
Subject: Re: make 3.81 MinGW port and testsuite working with MSYS
Date: Sat, 26 Feb 2005 17:07:55 -0500

What happens if you replace the test_driver.pl:run_command_with_output()
sub with the following; does it take care of line ending issues on those
systems where they currently appear?  This replacement still passes 100%
on my Linux system.


#-------------------------
sub run_command_with_output
{
  local ($filename) = shift;
  local ($code) = (0);
  local ($output);
  local $/ = undef;

  open(F, "> $filename") || return $?;

  open(P, " 2>&1 @_ |") || return $?;
  $output = <P>;
  close(P) or $code = $?;

  # Sanitize the output for different line endings
  $output =~ s/\r\n/\n/sg;

  print F $output;
  close(F) or $code = $?;

  print "run_command_with_output: \"@_\" returned $code.\n" if $debug;

  return $code;
}
#-------------------------

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          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




reply via email to

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