Commit 31ff97b2 authored by Ulf Möller's avatar Ulf Möller
Browse files

mk1mf.pl and mkdef.pl read OPTIONS from toplevel Makefile.

Configure no longer changes files in place.
parent 8bc1431e
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -298,6 +298,7 @@ my $flags="";
my $depflags="";
my $libs="";
my $target="";
my $options="";
foreach (@ARGV)
	{
	if (/^no-asm$/)
@@ -349,7 +350,8 @@ foreach (@ARGV)
			exit(1);
			}
		}
	elsif ($_ =~ /^([^:]+):(.+)$/) {
	elsif ($_ =~ /^([^:]+):(.+)$/)
		{
		eval "\$table{\$1} = \"$2\""; # allow $xxx constructs in the string
		$target=$1;
		}
@@ -358,6 +360,7 @@ foreach (@ARGV)
		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";
	}
+2 −1
Original line number Diff line number Diff line
@@ -82,7 +82,8 @@

 * Compile OpenSSL:

   Run ms\mw.bat
   > perl Configure Mingw32
   > ms\mw.bat

   This will create the library and binaries in out.

+1 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ VERSION=
MAJOR=
MINOR=
PLATFORM=dist
OPTIONS=
# INSTALL_PREFIX is for package builders so that they can configure
# for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
# Normally it is left empty.
+0 −3
Original line number Diff line number Diff line
@rem OpenSSL with Mingw32
@rem --------------------

perl Configure Mingw32
if errorlevel 1 goto end

@rem Makefile
perl util\mkfiles.pl >MINFO
perl util\mk1mf.pl Mingw32 >ms\mingw32.mak

tools/.cvsignore

0 → 100644
+2 −0
Original line number Diff line number Diff line
c_rehash
c_rehash.bak
Loading