6
6
# | (__| |_| | _ <| |___
7
7
# \___|\___/|_| \_\_____|
9
# Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
9
# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
11
11
# This software is licensed as described in the file COPYING, which
12
12
# you should have received as part of this distribution. The terms
19
19
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20
20
# KIND, either express or implied.
22
# $Id: testcurl.pl,v 1.55 2008-03-20 16:10:54 gknauf Exp $
22
# $Id: testcurl.pl,v 1.74 2009-05-12 11:24:29 yangtse Exp $
23
23
###########################################################################
25
25
###########################
69
69
$extvercmd $nocvsup $nobuildconf $crosscompile $timestamp);
71
71
# version of this script
72
$version='$Revision: 1.55 $';
72
$version='$Revision: 1.74 $';
75
75
# Determine if we're running from CVS or a canned copy of curl,
285
# Enable picky compiler warnings unless explicitly disabled
286
if (($confopts !~ /--enable-debug/) &&
287
($confopts !~ /--enable-warnings/) &&
288
($confopts !~ /--disable-warnings/)) {
289
$confopts .= " --enable-warnings";
277
292
my $str1066os = 'o' x 1066;
279
294
# Set timestamp to the UTC this script is running. Its value might
290
305
logit "CFLAGS = ".$ENV{CFLAGS};
291
306
logit "LDFLAGS = ".$ENV{LDFLAGS};
292
307
logit "CC = ".$ENV{CC};
308
logit "MAKEFLAGS = ".$ENV{MAKEFLAGS};
293
309
logit "target = ".$targetos;
294
310
logit "version = $version"; # script version
295
311
logit "date = $timestamp"; # When the test build starts
391
407
unlink "autom4te.cache";
393
409
# generate the build files
394
logit "invoke buildconf, but filter off the silly aclocal warnings";
410
logit "invoke buildconf, but filter off aclocal underquoted definition warnings";
395
411
open(F, "./buildconf 2>&1 |") or die;
396
412
open(LOG, ">$buildlog") or die;
486
502
system("xcopy /s /q ..\\$CURLDIR .");
487
503
system("buildconf.bat");
489
elsif (($^O eq 'linux') || ($targetos =~ /netware/)) {
490
system("cp -afr ../$CURLDIR/* .");
491
system("cp -af ../$CURLDIR/Makefile.dist Makefile");
505
elsif ($targetos =~ /netware/) {
506
system("cp -afr ../$CURLDIR/* .");
507
system("cp -af ../$CURLDIR/Makefile.dist Makefile");
508
system("$make -i -C lib -f Makefile.netware prebuild");
509
system("$make -i -C src -f Makefile.netware prebuild");
510
if (-d "../$CURLDIR/ares") {
511
system("$make -i -C ares -f Makefile.netware prebuild");
514
elsif ($^O eq 'linux') {
515
system("cp -afr ../$CURLDIR/* .");
516
system("cp -af ../$CURLDIR/Makefile.dist Makefile");
517
system("cp -af ../$CURLDIR/include/curl/curlbuild.h.dist ./include/curl/curlbuild.h");
492
518
system("$make -i -C lib -f Makefile.$targetos prebuild");
493
519
system("$make -i -C src -f Makefile.$targetos prebuild");
497
logit "display lib/config$confsuffix.h";
520
if (-d "../$CURLDIR/ares") {
521
system("cp -af ../$CURLDIR/ares/ares_build.h.dist ./ares/ares_build.h");
522
system("$make -i -C ares -f Makefile.$targetos prebuild");
527
if(-f "./libcurl.pc") {
528
logit_spaced "display libcurl.pc";
529
if(open(F, "<./libcurl.pc")) {
532
print $ll if(($ll !~ /^ *#/) && ($ll !~ /^ *$/));
538
if(-f "./include/curl/curlbuild.h") {
539
logit_spaced "display include/curl/curlbuild.h";
540
if(open(F, "<./include/curl/curlbuild.h")) {
543
print $ll if(($ll =~ /^ *# *define *CURL_/) && ($ll !~ /__CURL_CURLBUILD_H/));
549
mydie "no curlbuild.h created/found";
552
logit_spaced "display lib/config$confsuffix.h";
498
553
open(F, "lib/config$confsuffix.h") or die "lib/config$confsuffix.h: $!";
504
559
if (grepfile("define USE_ARES", "lib/config$confsuffix.h")) {
505
561
logit "setup to build ares";
507
logit "display ares/config$confsuffix.h";
563
if(-f "./ares/libcares.pc") {
564
logit_spaced "display ares/libcares.pc";
565
if(open(F, "<./ares/libcares.pc")) {
568
print $ll if(($ll !~ /^ *#/) && ($ll !~ /^ *$/));
574
if(-f "./ares/ares_build.h") {
575
logit_spaced "display ares/ares_build.h";
576
if(open(F, "<./ares/ares_build.h")) {
579
print $ll if(($ll =~ /^ *# *define *CARES_/) && ($ll !~ /__CARES_BUILD_H/));
585
mydie "no ares_build.h created/found";
588
logit_spaced "display ares/config$confsuffix.h";
508
589
if(open(F, "ares/config$confsuffix.h")) {