diff options
author | Richard Levitte <levitte@openssl.org> | 2018-10-23 14:14:48 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-01-21 19:31:32 +0100 |
commit | d7e4932eaf53a82a2606a73282d9c8a242c1a39d (patch) | |
tree | 2f51d61f92d7aea2b811d087fc2c33d6325c5771 /Configurations/platform.pm | |
parent | Make ca command silently use default if .attr file does not exist (diff) | |
download | openssl-d7e4932eaf53a82a2606a73282d9c8a242c1a39d.tar.xz openssl-d7e4932eaf53a82a2606a73282d9c8a242c1a39d.zip |
Rework building: initial changes
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)
Diffstat (limited to 'Configurations/platform.pm')
-rw-r--r-- | Configurations/platform.pm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Configurations/platform.pm b/Configurations/platform.pm new file mode 100644 index 0000000000..909da0ac72 --- /dev/null +++ b/Configurations/platform.pm @@ -0,0 +1,18 @@ +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__ |