]>
git.ipfire.org Git - thirdparty/openssl.git/blob - util/mkinstallvars.pl
2 # Copyright 2021 The OpenSSL Project Authors. All Rights Reserved.
4 # Licensed under the Apache License 2.0 (the "License"). You may not use
5 # this file except in compliance with the License. You can obtain a copy
6 # in the file LICENSE in the source distribution or at
7 # https://www.openssl.org/source/license.html
9 # All variables are supposed to come from Makefile, in environment variable
10 # form, or passed as variable assignments on the command line.
11 # The result is a Perl module creating the package OpenSSL::safe::installdata.
15 # These are expected to be set up as absolute directories
16 my @absolutes = qw(PREFIX);
17 # These may be absolute directories, and if not, they are expected to be set up
18 # as subdirectories to PREFIX
19 my @subdirs = qw(BINDIR LIBDIR INCLUDEDIR ENGINESDIR MODULESDIR APPLINKDIR);
23 (my $k, my $v) = m
|^([^=]*)=(.*)$|;
27 foreach my $k (sort keys %keys) {
29 $v = File
::Spec
->rel2abs($v) if $v && grep { $k eq $_ } @absolutes;
32 foreach my $k (sort keys %keys) {
33 my $v = $ENV{$k} || '.';
34 $v = File
::Spec
->rel2abs($v, $ENV{PREFIX
})
35 if ($v && !File
::Spec
->file_name_is_absolute($v)
36 && grep { $k eq $_ } @subdirs);
41 package OpenSSL
::safe
::installdata
;
46 our \
@ISA = qw(Exporter);
47 our \
@EXPORT = qw(\$PREFIX \$BINDIR \$LIBDIR \$INCLUDEDIR \$APPLINKDIR
48 \$ENGINESDIR \$MODULESDIR \$VERSION \$LDLIBS);
50 our \$PREFIX = '$ENV{PREFIX}';
51 our \$BINDIR = '$ENV{BINDIR}';
52 our \$LIBDIR = '$ENV{LIBDIR}';
53 our \$INCLUDEDIR = '$ENV{INCLUDEDIR}';
54 our \$ENGINESDIR = '$ENV{ENGINESDIR}';
55 our \$MODULESDIR = '$ENV{MODULESDIR}';
56 our \$APPLINKDIR = '$ENV{APPLINKDIR}';
57 our \$VERSION = '$ENV{VERSION}';
59 # Unix and Windows use space separation, VMS uses comma separation
60 split(/ +| *, */, '$ENV{LDLIBS}');