summaryrefslogtreecommitdiff
path: root/tests/run_make_tests.pl
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2005-02-26 01:41:48 +0000
committerPaul Smith <psmith@gnu.org>2005-02-26 01:41:48 +0000
commit9d153cc1b1e467cd6245755c32f78efbd62142c2 (patch)
tree229919252d0b4a25e1e5c00d80ab744fbe5b5c81 /tests/run_make_tests.pl
parent6d995b036e714ea3d61112ebc582b0671cc36e77 (diff)
downloadgunmake-9d153cc1b1e467cd6245755c32f78efbd62142c2.tar.gz
Add configure operations to support MINGW on Windows.
Diffstat (limited to 'tests/run_make_tests.pl')
-rwxr-xr-xtests/run_make_tests.pl25
1 files changed, 17 insertions, 8 deletions
diff --git a/tests/run_make_tests.pl b/tests/run_make_tests.pl
index aeba4e8..5276d29 100755
--- a/tests/run_make_tests.pl
+++ b/tests/run_make_tests.pl
@@ -12,6 +12,7 @@
# (and others)
$valgrind = 0; # invoke make with valgrind
+$pure_log = undef;
require "test_driver.pl";
@@ -215,7 +216,7 @@ sub set_more_defaults
#
# This is probably not specific enough.
#
- if ($osname =~ /Windows/i) {
+ if ($osname =~ /Windows/i || $osname =~ /MINGW32/i) {
$port_type = 'W32';
}
# Bleah, the osname is so variable on DOS. This kind of bites.
@@ -243,11 +244,17 @@ sub set_more_defaults
#
$wtime = $port_type eq 'UNIX' ? 1 : $port_type eq 'OS/2' ? 2 : 4;
+ print "Port type: $port_type\n" if $debug;
+ print "Make path: $make_path\n" if $debug;
+
# Find the full pathname of Make. For DOS systems this is more
- # complicated, so we ask make itself.
+ # complicated, so we ask make itself. The following shell code does not
+ # work on W32 (MinGW/MSYS)
- $make_path = `sh -c 'echo "all:;\@echo \\\$(MAKE)" | $make_path -f-'`;
- chop $make_path;
+ if ($port_type ne 'W32') {
+ $make_path = `sh -c 'echo "all:;\@echo \\\$(MAKE)" | $make_path -f-'`;
+ chop $make_path;
+ }
print "Make\t= `$make_path'\n" if $debug;
$string = `$make_path -v -f /dev/null 2> /dev/null`;
@@ -283,10 +290,12 @@ sub set_more_defaults
# Get Purify log info--if any.
- $ENV{PURIFYOPTIONS} =~ /.*-logfile=([^ ]+)/;
- $pure_log = $1 || '';
- $pure_log =~ s/%v/$make_name/;
- $purify_errors = 0;
+ if (exists $ENV{PURIFYOPTIONS}
+ && $ENV{PURIFYOPTIONS} =~ /.*-logfile=([^ ]+)/) {
+ $pure_log = $1 || '';
+ $pure_log =~ s/%v/$make_name/;
+ $purify_errors = 0;
+ }
$string = `sh -c "$make_path -j 2 -f /dev/null 2>&1"`;
if ($string =~ /not supported/) {