summaryrefslogtreecommitdiffstats
path: root/Configure
diff options
context:
space:
mode:
authorUlf Möller <ulf@openssl.org>1999-05-13 10:28:14 +0000
committerUlf Möller <ulf@openssl.org>1999-05-13 10:28:14 +0000
commit31ff97b28a7d9c64192b8987b204ad9820c7b2c7 (patch)
tree4f7054f3b9116cbfd5a2daef7e98c4044b0ffd84 /Configure
parent8bc1431eddb4c4724d9afa42c95943d3f8184435 (diff)
mk1mf.pl and mkdef.pl read OPTIONS from toplevel Makefile.
Configure no longer changes files in place.
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure15
1 files changed, 8 insertions, 7 deletions
diff --git a/Configure b/Configure
index 46c3e188cf..b7f910f284 100755
--- a/Configure
+++ b/Configure
@@ -298,6 +298,7 @@ my $flags="";
my $depflags="";
my $libs="";
my $target="";
+my $options="";
foreach (@ARGV)
{
if (/^no-asm$/)
@@ -349,15 +350,17 @@ foreach (@ARGV)
exit(1);
}
}
- elsif ($_ =~ /^([^:]+):(.+)$/) {
+ elsif ($_ =~ /^([^:]+):(.+)$/)
+ {
eval "\$table{\$1} = \"$2\""; # allow $xxx constructs in the string
$target=$1;
- }
+ }
else
{
die "target already defined - $target\n" if ($target ne "");
$target=$_;
}
+ $options .= $_ unless $_ eq $target;
}
&usage if (!defined($table{$target}));
@@ -477,6 +480,7 @@ while (<IN>)
s/^OPENSSLDIR=.*$/OPENSSLDIR=$openssldir/;
s/^INSTALL_PREFIX=.*$/INSTALL_PREFIX=$install_prefix/;
s/^PLATFORM=.*$/PLATFORM=$target/;
+ s/^OPTIONS=.*$/OPTIONS=$options/;
s/^CC=.*$/CC= $cc/;
s/^CFLAG=.*$/CFLAG= $cflags/;
s/^DEPFLAG=.*$/DEPFLAG= $depflags/;
@@ -641,11 +645,8 @@ if($IsWindows) {
(system "make -f Makefile.ssl PERL=\'$perl\' links") == 0 or exit $?;
(system 'make depend') == 0 or exit $? if $depflags ne "";
&dofile("tools/c_rehash",$openssldir,'^DIR=', 'DIR=%s',);
- &dofile("util/mk1mf.pl",$openssldir,
- ('^\$INSTALLTOP=','$INSTALLTOP="%s";',));
}
-
my $pwd;
if($IsWindows) {
@@ -730,7 +731,7 @@ sub dofile
my $f; my $p; my %m; my @a; my $k; my $ff;
($f,$p,%m)=@_;
- open(IN,"<$f") || die "unable to open $f:$!\n";
+ open(IN,"<$f.in") || open(IN,"<$f") || die "unable to open $f:$!\n";
@a=<IN>;
close(IN);
foreach $k (keys %m)
@@ -741,6 +742,6 @@ sub dofile
open(OUT,">$ff.new") || die "unable to open $f:$!\n";
print OUT @a;
close(OUT);
- rename($f,"$ff.bak") || die "unable to rename $f\n";
+ rename($f,"$ff.bak") || die "unable to rename $f\n" if -e $f;
rename("$ff.new",$f) || die "unable to rename $ff.new\n";
}