forced to use nmake for VC builds early so that its also used for ares even if we find a GNU make first in path; simplified curl make call.

This commit is contained in:
Gunter Knauf 2009-05-21 15:18:26 +00:00
parent 5e2b5edde5
commit 274dc3ecac

View File

@ -463,10 +463,8 @@ if ($configurebuild) {
sub findinpath { sub findinpath {
my $c; my $c;
my $e; my $e;
my $x=''; my $x = ($^O eq 'MSWin32') ? '.exe' : '';
$x='.exe' if ($^O eq 'MSWin32'); my $s = ($^O eq 'MSWin32') ? ';' : ':';
my $s=':';
$s=';' if ($^O eq 'MSWin32');
my $p=$ENV{'PATH'}; my $p=$ENV{'PATH'};
my @pa = split($s, $p); my @pa = split($s, $p);
for $c (@_) { for $c (@_) {
@ -482,6 +480,8 @@ my $make = findinpath("gmake", "make", "nmake");
if(!$make) { if(!$make) {
mydie "Couldn't find make in the PATH"; mydie "Couldn't find make in the PATH";
} }
# force to 'nmake' for VC builds
$make = "nmake" if ($targetos =~ /vc/);
logit "going with $make as make"; logit "going with $make as make";
# change to build dir # change to build dir
@ -621,24 +621,9 @@ if (grepfile("define USE_ARES", "lib/config$confsuffix.h")) {
chdir "$pwd/$build"; chdir "$pwd/$build";
} }
if ($configurebuild) { my $mkcmd = "$make -i" . ($targetos && !$configurebuild ? " $targetos" : "");
logit "$make -i"; logit "$mkcmd";
open(F, "$make -i 2>&1 |") or die; open(F, "$mkcmd 2>&1 |") or die;
}
else {
logit "$make -i $targetos";
if ($^O eq 'MSWin32') {
if ($targetos =~ /vc/) {
open(F, "nmake -i $targetos|") or die;
}
else {
open(F, "$make -i $targetos |") or die;
}
}
else {
open(F, "$make -i $targetos 2>&1 |") or die;
}
}
while (<F>) { while (<F>) {
s/$pwd//g; s/$pwd//g;
print; print;