Process MINFO file earlier in mk1mf.pl so it can modify variables like CFLAGS.

Process kerberos include and library options.
This commit is contained in:
Dr. Stephen Henson 2005-04-20 16:22:58 +00:00
parent 00b8abee61
commit 2dc08d5f5d

View File

@ -274,6 +274,63 @@ $link="$bin_dir$link" if ($link !~ /^\$/);
$INSTALLTOP =~ s|/|$o|g;
#############################################
# We parse in input file and 'store' info for later printing.
open(IN,"<$infile") || die "unable to open $infile:$!\n";
$_=<IN>;
for (;;)
{
chop;
($key,$val)=/^([^=]+)=(.*)/;
if ($key eq "RELATIVE_DIRECTORY")
{
if ($lib ne "")
{
$uc=$lib;
$uc =~ s/^lib(.*)\.a/$1/;
$uc =~ tr/a-z/A-Z/;
$lib_nam{$uc}=$uc;
$lib_obj{$uc}.=$libobj." ";
}
last if ($val eq "FINISHED");
$lib="";
$libobj="";
$dir=$val;
}
if ($key eq "KRB5_INCLUDES")
{ $cflags .= " $val";}
if ($key eq "LIBKRB5")
{ $ex_libs .= " $val";}
if ($key eq "TEST")
{ $test.=&var_add($dir,$val); }
if (($key eq "PROGS") || ($key eq "E_OBJ"))
{ $e_exe.=&var_add($dir,$val); }
if ($key eq "LIB")
{
$lib=$val;
$lib =~ s/^.*\/([^\/]+)$/$1/;
}
if ($key eq "EXHEADER")
{ $exheader.=&var_add($dir,$val); }
if ($key eq "HEADER")
{ $header.=&var_add($dir,$val); }
if ($key eq "LIBOBJ")
{ $libobj=&var_add($dir,$val); }
if (!($_=<IN>))
{ $_="RELATIVE_DIRECTORY=FINISHED\n"; }
}
close(IN);
$defs= <<"EOF";
# This makefile has been automatically generated from the OpenSSL distribution.
# This single makefile will build the complete OpenSSL distribution and
@ -492,57 +549,6 @@ printf OUT " #define DATE \"%s\"\n", scalar gmtime();
printf OUT "#endif\n";
close(OUT);
#############################################
# We parse in input file and 'store' info for later printing.
open(IN,"<$infile") || die "unable to open $infile:$!\n";
$_=<IN>;
for (;;)
{
chop;
($key,$val)=/^([^=]+)=(.*)/;
if ($key eq "RELATIVE_DIRECTORY")
{
if ($lib ne "")
{
$uc=$lib;
$uc =~ s/^lib(.*)\.a/$1/;
$uc =~ tr/a-z/A-Z/;
$lib_nam{$uc}=$uc;
$lib_obj{$uc}.=$libobj." ";
}
last if ($val eq "FINISHED");
$lib="";
$libobj="";
$dir=$val;
}
if ($key eq "TEST")
{ $test.=&var_add($dir,$val); }
if (($key eq "PROGS") || ($key eq "E_OBJ"))
{ $e_exe.=&var_add($dir,$val); }
if ($key eq "LIB")
{
$lib=$val;
$lib =~ s/^.*\/([^\/]+)$/$1/;
}
if ($key eq "EXHEADER")
{ $exheader.=&var_add($dir,$val); }
if ($key eq "HEADER")
{ $header.=&var_add($dir,$val); }
if ($key eq "LIBOBJ")
{ $libobj=&var_add($dir,$val); }
if (!($_=<IN>))
{ $_="RELATIVE_DIRECTORY=FINISHED\n"; }
}
close(IN);
# Strip of trailing ' '
foreach (keys %lib_obj) { $lib_obj{$_}=&clean_up_ws($lib_obj{$_}); }
$test=&clean_up_ws($test);