Trial to fix win32 autobuilds.

It seems that its time to look at some better ideas for the win32
non-configure builds; probably a prebuild target which copies
config-win32.h to curl_config.h and appends also then feature
defines like USE_ARES.
This commit is contained in:
Guenter Knauf 2010-08-20 02:33:29 +02:00
parent dc4adc484f
commit f37affab8c
1 changed files with 11 additions and 10 deletions

View File

@ -64,7 +64,7 @@ use Cwd;
#BEGIN { $^W = 1; }
use vars qw($version $fixed $infixed $CURLDIR $git $pwd $build $buildlog
$buildlogname $configurebuild $targetos $confsuffix $binext
$buildlogname $configurebuild $targetos $confheader $binext
$libext);
use vars qw($name $email $desc $confopts $runtestopts $setupfile $mktarball
@ -72,7 +72,7 @@ use vars qw($name $email $desc $confopts $runtestopts $setupfile $mktarball
$timestamp);
# version of this script
$version='2010-10-10';
$version='2010-08-20';
$fixed=0;
# Determine if we're running from git or a canned copy of curl,
@ -132,7 +132,7 @@ while ($ARGV[0]) {
# Do the platform-specific stuff here
$configurebuild = 1;
$confsuffix = '';
$confheader = 'curl_config.h';
$binext = '';
$libext = '.la'; # .la since both libcurl and libcares are made with libtool
if ($^O eq 'MSWin32' || $targetos) {
@ -168,10 +168,10 @@ if (($^O eq 'MSWin32' || $^O eq 'msys') &&
# Set these things only when building ON Windows and for Win32 platform.
# FOR Windows since we might be cross-compiling on another system. Non-
# Windows builds still default to configure-style builds with no confsuffix.
# Windows builds still default to configure-style builds with curl_config.h.
$configurebuild = 0;
$confsuffix = '-win32';
$confheader = 'config-win32.h';
}
$ENV{LC_ALL}="C" if (($ENV{LC_ALL}) && ($ENV{LC_ALL} !~ /^C$/));
@ -567,14 +567,14 @@ else {
mydie "no curlbuild.h created/found";
}
logit_spaced "display lib/curl_config$confsuffix.h";
open(F, "lib/curl_config$confsuffix.h") or die "lib/curl_config$confsuffix.h: $!";
logit_spaced "display lib/$confheader";
open(F, "lib/$confheader") or die "lib/$confheader: $!";
while (<F>) {
print if /^ *#/;
}
close(F);
if (grepfile("^#define USE_ARES", "lib/curl_config$confsuffix.h")) {
if (grepfile("^#define USE_ARES", "lib/$confheader")) {
print "\n";
logit "setup to build ares";
@ -603,8 +603,9 @@ if (grepfile("^#define USE_ARES", "lib/curl_config$confsuffix.h")) {
mydie "no ares_build.h created/found";
}
logit_spaced "display ares/ares_config$confsuffix.h";
if(open(F, "ares/ares_config$confsuffix.h")) {
$confheader =~ s/curl/ares/;
logit_spaced "display ares/$confheader";
if(open(F, "ares/$confheader")) {
while (<F>) {
print if /^ *#/;
}