my %includes = ();
my %defines = ();
my %depends = ();
- my %renames = ();
- my %sharednames = ();
my %generate = ();
# We want to detect configdata.pm in the source tree, so we
=> sub { push @{$generate{$1}}, $2
if !@skip || $skip[$#skip] > 0 },
qr/^\s*RENAME\[((?:\\.|[^\\\]])+)\]\s*=\s*(.*)\s*$/
- => sub { push @{$renames{$1}}, tokenize($2)
- if !@skip || $skip[$#skip] > 0 },
- qr/^\s*SHARED_NAME\[((?:\\.|[^\\\]])+)\]\s*=\s*(.*)\s*$/
- => sub { push @{$sharednames{$1}}, tokenize($2)
- if !@skip || $skip[$#skip] > 0 },
+ => sub { warn "RENAME is no longer supported\n" },
+ qr/^\s*SHARED_NAME\[((?:\\.|[^\\\]])+)\]\s*=\s*(.*)\s*$/
+ => sub { warn "SHARED_NAME is no longer supported\n" },
qr/^\s*BEGINRAW\[((?:\\.|[^\\\]])+)\]\s*$/
=> sub {
my $lineiterator = shift;
);
die "runaway IF?" if (@skip);
- foreach (keys %renames) {
- die "$_ renamed to more than one thing: "
- ,join(" ", @{$renames{$_}}),"\n"
- if scalar @{$renames{$_}} > 1;
- my $dest = cleanfile($buildd, $_, $blddir);
- my $to = cleanfile($buildd, $renames{$_}->[0], $blddir);
- die "$dest renamed to more than one thing: "
- ,$unified_info{rename}->{$dest}, $to
- unless !defined($unified_info{rename}->{$dest})
- or $unified_info{rename}->{$dest} eq $to;
- $unified_info{rename}->{$dest} = $to;
- }
-
foreach (@programs) {
my $program = cleanfile($buildd, $_, $blddir);
- if ($unified_info{rename}->{$program}) {
- $program = $unified_info{rename}->{$program};
- }
$unified_info{programs}->{$program} = 1;
}
foreach (@programs_install) {
my $program = cleanfile($buildd, $_, $blddir);
- if ($unified_info{rename}->{$program}) {
- $program = $unified_info{rename}->{$program};
- }
$unified_info{install}->{programs}->{$program} = 1;
}
foreach (@libraries) {
my $library = cleanfile($buildd, $_, $blddir);
- if ($unified_info{rename}->{$library}) {
- $library = $unified_info{rename}->{$library};
- }
$unified_info{libraries}->{$library} = 1;
}
foreach (@libraries_install) {
my $library = cleanfile($buildd, $_, $blddir);
- if ($unified_info{rename}->{$library}) {
- $library = $unified_info{rename}->{$library};
- }
$unified_info{install}->{libraries}->{$library} = 1;
}
EOF
foreach (@engines) {
my $library = cleanfile($buildd, $_, $blddir);
- if ($unified_info{rename}->{$library}) {
- $library = $unified_info{rename}->{$library};
- }
$unified_info{engines}->{$library} = 1;
}
foreach (@engines_install) {
my $library = cleanfile($buildd, $_, $blddir);
- if ($unified_info{rename}->{$library}) {
- $library = $unified_info{rename}->{$library};
- }
$unified_info{install}->{engines}->{$library} = 1;
}
foreach (@scripts) {
my $script = cleanfile($buildd, $_, $blddir);
- if ($unified_info{rename}->{$script}) {
- $script = $unified_info{rename}->{$script};
- }
$unified_info{scripts}->{$script} = 1;
}
foreach (@scripts_install) {
my $script = cleanfile($buildd, $_, $blddir);
- if ($unified_info{rename}->{$script}) {
- $script = $unified_info{rename}->{$script};
- }
$unified_info{install}->{scripts}->{$script} = 1;
}
push @{$unified_info{rawlines}}, @rawlines;
- unless ($disabled{shared}) {
- # Check sharednames.
- foreach (keys %sharednames) {
- my $dest = cleanfile($buildd, $_, $blddir);
- if ($unified_info{rename}->{$dest}) {
- $dest = $unified_info{rename}->{$dest};
- }
- die "shared_name for $dest with multiple values: "
- ,join(" ", @{$sharednames{$_}}),"\n"
- if scalar @{$sharednames{$_}} > 1;
- my $to = cleanfile($buildd, $sharednames{$_}->[0], $blddir);
- die "shared_name found for a library $dest that isn't defined\n"
- unless $unified_info{libraries}->{$dest};
- die "shared_name for $dest with multiple values: "
- ,$unified_info{sharednames}->{$dest}, ", ", $to
- unless !defined($unified_info{sharednames}->{$dest})
- or $unified_info{sharednames}->{$dest} eq $to;
- $unified_info{sharednames}->{$dest} = $to;
- }
-
- # Additionally, we set up sharednames for libraries that don't
- # have any, as themselves. Only for libraries that aren't
- # explicitly static.
- foreach (grep !/\.a$/, keys %{$unified_info{libraries}}) {
- if (!defined $unified_info{sharednames}->{$_}) {
- $unified_info{sharednames}->{$_} = $_
- }
- }
-
- # Check that we haven't defined any library as both shared and
- # explicitly static. That is forbidden.
- my @doubles = ();
- foreach (grep /\.a$/, keys %{$unified_info{libraries}}) {
- (my $l = $_) =~ s/\.a$//;
- push @doubles, $l if defined $unified_info{sharednames}->{$l};
- }
- die "these libraries are both explicitly static and shared:\n ",
- join(" ", @doubles), "\n"
- if @doubles;
+ # Check that we haven't defined any library as both shared and
+ # explicitly static. That is forbidden.
+ my @doubles = ();
+ foreach (grep /\.a$/, keys %{$unified_info{libraries}}) {
+ (my $l = $_) =~ s/\.a$//;
+ push @doubles, $l if defined $unified_info{libraries}->{$l};
}
+ die "these libraries are both explicitly static and shared:\n ",
+ join(" ", @doubles), "\n"
+ if @doubles;
foreach (keys %sources) {
my $dest = $_;
my $ddest = cleanfile($buildd, $_, $blddir);
- if ($unified_info{rename}->{$ddest}) {
- $ddest = $unified_info{rename}->{$ddest};
- }
foreach (@{$sources{$dest}}) {
my $s = cleanfile($sourced, $_, $blddir);
foreach (keys %shared_sources) {
my $dest = $_;
my $ddest = cleanfile($buildd, $_, $blddir);
- if ($unified_info{rename}->{$ddest}) {
- $ddest = $unified_info{rename}->{$ddest};
- }
foreach (@{$shared_sources{$dest}}) {
my $s = cleanfile($sourced, $_, $blddir);
foreach (keys %generate) {
my $dest = $_;
my $ddest = cleanfile($buildd, $_, $blddir);
- if ($unified_info{rename}->{$ddest}) {
- $ddest = $unified_info{rename}->{$ddest};
- }
die "more than one generator for $dest: "
,join(" ", @{$generate{$_}}),"\n"
if scalar @{$generate{$_}} > 1;
# a generated file in the build tree.
if ($ddest ne "" && ($ddest eq $src_configdata || ! -f $ddest)) {
$ddest = cleanfile($buildd, $_, $blddir);
- if ($unified_info{rename}->{$ddest}) {
- $ddest = $unified_info{rename}->{$ddest};
- }
}
foreach (@{$depends{$dest}}) {
my $d = cleanfile($sourced, $_, $blddir);
# should be added back after treatment.
$d =~ /(\.a)?$/;
my $e = $1 // "";
- $d = $`;
- if ($unified_info{rename}->{$d}) {
- $d = $unified_info{rename}->{$d};
- }
- $d .= $e;
+ $d = $`.$e;
$unified_info{depends}->{$ddest}->{$d} = 1;
}
}
# a generated file in the build tree.
if ($ddest eq $src_configdata || ! -f $ddest) {
$ddest = cleanfile($buildd, $_, $blddir);
- if ($unified_info{rename}->{$ddest}) {
- $ddest = $unified_info{rename}->{$ddest};
- }
}
foreach (@{$includes{$dest}}) {
my $is = cleandir($sourced, $_, $blddir);
# %skipdir there for further explanations.
SUBDIRS=crypto ssl apps test util tools fuzz engines
-{-
- my @sover = split(/\./, $config{shlib_version});
- our $sover_filename;
- $sover_filename = join('.', @sover)
- if $config{target} =~ /^mingw/ || $config{target} =~ /^VC-/;
- $sover_filename = join('', map { sprintf "%02d", $_ } @sover)
- if $config{target} =~ /^vms/;
- "";
--}
LIBS=libcrypto libssl
INCLUDE[libcrypto]=. crypto/include include
INCLUDE[libssl]=. include
SHARED_SOURCE[libcrypto]=libcrypto.rc
SHARED_SOURCE[libssl]=libssl.rc
ENDIF
-
-IF[{- $config{target} =~ /^Cygwin/ -}]
- SHARED_NAME[libcrypto]=cygcrypto-{- $sover_filename -}
- SHARED_NAME[libssl]=cygssl-{- $sover_filename -}
-ELSIF[{- $config{target} =~ /^mingw/ -}]
- SHARED_NAME[libcrypto]=libcrypto-{- $sover_filename -}{- $config{target} eq "mingw64" ? "-x64" : "" -}
- SHARED_NAME[libssl]=libssl-{- $sover_filename -}{- $config{target} eq "mingw64" ? "-x64" : "" -}
-ELSIF[{- $config{target} =~ /^VC-/ -}]
- SHARED_NAME[libcrypto]=libcrypto-{- $sover_filename -}{- $target{multilib} -}
- SHARED_NAME[libssl]=libssl-{- $sover_filename -}{- $target{multilib} -}
-ENDIF
-
-# VMS has a cultural standard where all libraries are prefixed.
-# For OpenSSL, the choice is 'ossl$' (this prefix was claimed in a
-# conversation with VSI, Tuesday January 26 2016)
-# Also, it seems it's usual to have the pointer size the libraries
-# were built for as part of the name.
-IF[{- $config{target} =~ /^vms/ -}]
- RENAME[libcrypto]=ossl$libcrypto{- $target{pointer_size} -}
- RENAME[libssl]=ossl$libssl{- $target{pointer_size} -}
- SHARED_NAME[libcrypto]=ossl$libcrypto{- $sover_filename -}_shr{- $target{pointer_size} -}
- SHARED_NAME[libssl]=ossl$libssl{- $sover_filename -}_shr{- $target{pointer_size} -}
-ENDIF