12 |
# (and others) |
# (and others) |
13 |
|
|
14 |
$valgrind = 0; # invoke make with valgrind |
$valgrind = 0; # invoke make with valgrind |
15 |
|
$pure_log = undef; |
16 |
|
|
17 |
require "test_driver.pl"; |
require "test_driver.pl"; |
18 |
|
|
216 |
# |
# |
217 |
# This is probably not specific enough. |
# This is probably not specific enough. |
218 |
# |
# |
219 |
if ($osname =~ /Windows/i) { |
if ($osname =~ /Windows/i || $osname =~ /MINGW32/i) { |
220 |
$port_type = 'W32'; |
$port_type = 'W32'; |
221 |
} |
} |
222 |
# Bleah, the osname is so variable on DOS. This kind of bites. |
# Bleah, the osname is so variable on DOS. This kind of bites. |
244 |
# |
# |
245 |
$wtime = $port_type eq 'UNIX' ? 1 : $port_type eq 'OS/2' ? 2 : 4; |
$wtime = $port_type eq 'UNIX' ? 1 : $port_type eq 'OS/2' ? 2 : 4; |
246 |
|
|
247 |
|
print "Port type: $port_type\n" if $debug; |
248 |
|
print "Make path: $make_path\n" if $debug; |
249 |
|
|
250 |
# Find the full pathname of Make. For DOS systems this is more |
# Find the full pathname of Make. For DOS systems this is more |
251 |
# complicated, so we ask make itself. |
# complicated, so we ask make itself. The following shell code does not |
252 |
|
# work on W32 (MinGW/MSYS) |
253 |
|
|
254 |
$make_path = `sh -c 'echo "all:;\@echo \\\$(MAKE)" | $make_path -f-'`; |
if ($port_type ne 'W32') { |
255 |
chop $make_path; |
$make_path = `sh -c 'echo "all:;\@echo \\\$(MAKE)" | $make_path -f-'`; |
256 |
|
chop $make_path; |
257 |
|
} |
258 |
print "Make\t= `$make_path'\n" if $debug; |
print "Make\t= `$make_path'\n" if $debug; |
259 |
|
|
260 |
$string = `$make_path -v -f /dev/null 2> /dev/null`; |
$string = `$make_path -v -f /dev/null 2> /dev/null`; |
290 |
|
|
291 |
# Get Purify log info--if any. |
# Get Purify log info--if any. |
292 |
|
|
293 |
$ENV{PURIFYOPTIONS} =~ /.*-logfile=([^ ]+)/; |
if (exists $ENV{PURIFYOPTIONS} |
294 |
$pure_log = $1 || ''; |
&& $ENV{PURIFYOPTIONS} =~ /.*-logfile=([^ ]+)/) { |
295 |
$pure_log =~ s/%v/$make_name/; |
$pure_log = $1 || ''; |
296 |
$purify_errors = 0; |
$pure_log =~ s/%v/$make_name/; |
297 |
|
$purify_errors = 0; |
298 |
|
} |
299 |
|
|
300 |
$string = `sh -c "$make_path -j 2 -f /dev/null 2>&1"`; |
$string = `sh -c "$make_path -j 2 -f /dev/null 2>&1"`; |
301 |
if ($string =~ /not supported/) { |
if ($string =~ /not supported/) { |