changed to reflect recent NetWare makefile changes;

moved call to buildconf.bat down so that it takes place in the build dir.
This commit is contained in:
Gunter Knauf 2004-07-05 21:32:18 +00:00
parent 576b40b1b0
commit bdcf8d626d
1 changed files with 23 additions and 14 deletions

View File

@ -51,7 +51,7 @@ use Cwd;
BEGIN { $^W = 1; } BEGIN { $^W = 1; }
use vars qw($version $fixed $infixed $CURLDIR $CVS $pwd $build $buildlog use vars qw($version $fixed $infixed $CURLDIR $CVS $pwd $build $buildlog
$buildlogname $gnulikebuild $targetos $confsuffix $binext); $buildlogname $gnulikebuild $targetos $confsuffix $binext $libext);
use vars qw($name $email $desc $confopts $setupfile); use vars qw($name $email $desc $confopts $setupfile);
# version of this script # version of this script
@ -79,6 +79,7 @@ while ($ARGV[0]) {
$gnulikebuild = 1; $gnulikebuild = 1;
$confsuffix = ''; $confsuffix = '';
$binext = ''; $binext = '';
$libext = '.a';
if ($^O eq 'MSWin32' || $targetos ne '') { if ($^O eq 'MSWin32' || $targetos ne '') {
$gnulikebuild = 0; $gnulikebuild = 0;
if ($targetos eq '') { if ($targetos eq '') {
@ -88,9 +89,10 @@ if ($^O eq 'MSWin32' || $targetos ne '') {
if ($targetos =~ /vc/ || $targetos =~ /mingw32/) { if ($targetos =~ /vc/ || $targetos =~ /mingw32/) {
$confsuffix = '-win32'; $confsuffix = '-win32';
$binext = '.exe'; $binext = '.exe';
$libext = '.lib' if ($targetos =~ /vc/);
} elsif ($targetos =~ /netware/) { } elsif ($targetos =~ /netware/) {
$confsuffix = '-netware';
$binext = '.nlm'; $binext = '.nlm';
$libext = '.lib';
} }
} }
@ -156,7 +158,7 @@ if (open(F, "$setupfile")) {
close(F); close(F);
$infixed=$fixed; $infixed=$fixed;
} else { } else {
$infixed=0; # so that "additional args to configure" works properly first time... $infixed=0; # so that "additional args to configure" works properly first time...
} }
if (!$name) { if (!$name) {
@ -307,13 +309,12 @@ if ($CVS) {
close(LOG); close(LOG);
if (grepfile("^buildconf: OK", $buildlog)) { if (grepfile("^buildconf: OK", $buildlog)) {
logit "buildconf was successful"; logit "buildconf was successful";
} else { } else {
mydie "buildconf was NOT successful"; mydie "buildconf was NOT successful";
} }
} else { } else {
system("buildconf.bat") if ($^O eq 'MSWin32'); logit "buildconf was successful (dummy message)";
# logit "buildconf was successful (dummy message)" if ($^O eq 'linux');
} }
} }
@ -341,10 +342,14 @@ if ($gnulikebuild) {
mydie "configure didn't work"; mydie "configure didn't work";
} }
} else { } else {
system("xcopy /s /q ..\\$CURLDIR .") if ($^O eq 'MSWin32'); if ($^O eq 'MSWin32') {
if ($^O eq 'linux') { system("xcopy /s /q ..\\$CURLDIR .");
system("buildconf.bat");
} elsif ($^O eq 'linux') {
system("cp -ar ../$CURLDIR/* ."); system("cp -ar ../$CURLDIR/* .");
system("cp -a ../$CURLDIR/Makefile.dist Makefile"); system("cp -af ../$CURLDIR/Makefile.dist Makefile");
system("make -i -C lib -f Makefile.$targetos prebuild");
system("make -i -C src -f Makefile.$targetos prebuild");
} }
} }
@ -367,17 +372,21 @@ if (grepfile("define USE_ARES", "lib/config$confsuffix.h")) {
logit "build ares"; logit "build ares";
chdir "ares"; chdir "ares";
open(F, "make 2>&1 |") or die; if ($targetos ne '') {
open(F, "make -f Makefile.$targetos 2>&1 |") or die;
} else {
open(F, "make 2>&1 |") or die;
}
while (<F>) { while (<F>) {
s/$pwd//g; s/$pwd//g;
print; print;
} }
close(F); close(F);
if (-f "libcares.a") { if (-f "libcares$libext") {
logit "ares is now built successfully"; logit "ares is now built successfully (libcares.$libext)";
} else { } else {
logit "ares build failed"; logit "ares build failed (libares.$libext)";
} }
# cd back to the curl build dir # cd back to the curl build dir