mirror of
https://github.com/openssl/openssl.git
synced 2024-12-03 05:41:46 +08:00
d7e4932eaf
This is the start of a major work to correct some quirks in the buiding system. The base for this is to move certain attributes that lack desired flexibility from Configurations/*.conf to perl modules that can be selected with one single attribute in the config targets. The way this is meant to work is by adding this attribute in select config targets: perl_module => 'Name'; # Name to be replaced Then, in the perl scripts or modules that need the functionality, these lines should be added: use lib catdir($srcdir, 'Configurations'); # Ensure access to platform.pm use lib $blddir; # Ensure access to configdata.pm use platform; # Will load platform::$target{perl_module} Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/7473)
19 lines
304 B
Perl
19 lines
304 B
Perl
package platform;
|
|
|
|
use strict;
|
|
use warnings;
|
|
use vars qw(@ISA);
|
|
|
|
# Callers must make sure @INC has the build directory
|
|
use configdata;
|
|
|
|
my $module = $target{perl_platform} || 'Unix';
|
|
(my $module_path = $module) =~ s|::|/|g;
|
|
|
|
require "platform/$module_path.pm";
|
|
@ISA = ("platform::$module");
|
|
|
|
1;
|
|
|
|
__END__
|