added --extvercmd parameter which can be used to specify an external command to display 'curl --version', f.e. with MinW32 crosscompile --extvercmd=/usr/bin/wine can be used.

This commit is contained in:
Gunter Knauf 2008-03-20 16:10:54 +00:00
parent 86cbb23282
commit c0a30b04c2
1 changed files with 11 additions and 11 deletions

View File

@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___ # | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____| # \___|\___/|_| \_\_____|
# #
# Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al. # Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
# #
# This software is licensed as described in the file COPYING, which # This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms # you should have received as part of this distribution. The terms
@ -43,6 +43,7 @@
# --crosscompile This is a crosscompile # --crosscompile This is a crosscompile
# --desc=[desc] Description of your test system # --desc=[desc] Description of your test system
# --email=[email] Set email address to report as # --email=[email] Set email address to report as
# --extvercmd=[command] Command to use for displaying version with cross compiles.
# --mktarball=[command] Command to run after completed test # --mktarball=[command] Command to run after completed test
# --name=[name] Set name to report as # --name=[name] Set name to report as
# --nocvsup Don't update from CVS even though it is a CVS tree # --nocvsup Don't update from CVS even though it is a CVS tree
@ -65,7 +66,7 @@ use vars qw($version $fixed $infixed $CURLDIR $CVS $pwd $build $buildlog
$buildlogname $configurebuild $targetos $confsuffix $binext $buildlogname $configurebuild $targetos $confsuffix $binext
$libext); $libext);
use vars qw($name $email $desc $confopts $runtestopts $setupfile $mktarball use vars qw($name $email $desc $confopts $runtestopts $setupfile $mktarball
$nocvsup $nobuildconf $crosscompile $timestamp); $extvercmd $nocvsup $nobuildconf $crosscompile $timestamp);
# version of this script # version of this script
$version='$Revision$'; $version='$Revision$';
@ -83,6 +84,9 @@ while ($ARGV[0]) {
elsif ($ARGV[0] =~ /--setup=/) { elsif ($ARGV[0] =~ /--setup=/) {
$setupfile = (split(/=/, shift @ARGV))[1]; $setupfile = (split(/=/, shift @ARGV))[1];
} }
elsif ($ARGV[0] =~ /--extvercmd=/) {
$extvercmd = (split(/=/, shift @ARGV))[1];
}
elsif ($ARGV[0] =~ /--mktarball=/) { elsif ($ARGV[0] =~ /--mktarball=/) {
$mktarball = (split(/=/, shift @ARGV))[1]; $mktarball = (split(/=/, shift @ARGV))[1];
} }
@ -578,14 +582,10 @@ else {
mydie "curl was not created (curl$binext)"; mydie "curl was not created (curl$binext)";
} }
if ($targetos =~ /netware/) { if (!$crosscompile || (($extvercmd ne '') && (-x $extvercmd))) {
if (-f '../../curlver') { logit "display curl${binext} --version output";
system('../../curlver'); my $cmd = ($extvercmd ne '' ? $extvercmd.' ' : '')."./src/curl${binext} --version|";
} open(F, $cmd);
}
elsif(!$crosscompile) {
logit "display curl$binext --version output";
open(F, "./src/curl$binext --version|");
while(<F>) { while(<F>) {
print; print;
print LOG; print LOG;
@ -629,7 +629,7 @@ if ($configurebuild && !$crosscompile) {
} }
# create a tarball if we got that option. # create a tarball if we got that option.
if (($mktarball ne '') && (-f $mktarball)) { if (($mktarball ne '') && (-x $mktarball)) {
system($mktarball); system($mktarball);
} }