diff options
author | Richard Levitte <levitte@openssl.org> | 2018-02-23 12:10:42 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2018-02-26 08:51:06 +0100 |
commit | e454f3add638fda5c2aa32cd368c8929c0b1eb09 (patch) | |
tree | c6fd17c4fb962afe02e172f00418852ea61afa6b /Configurations/windows-makefile.tmpl | |
parent | 441bcafd865947474741a71fea49fc5d078b6532 (diff) |
Make it possible to give --libdir an absolute path
With this, we introduce the make variable 'libdir', which differs from
'LIBDIR' not only in casing, but also by being the absolute path to
the library installation directory. This variable is intentionally
compatible with the GNU coding standards.
When --libdir is given an absolute path, it is considered as a value
according to GNU coding standards, and the variables LIBDIR and libdir
will be this:
LIBDIR=
libdir=/absolute/path
When --libdir is given a relative path (just the name of the desired
library directory), or not given at all, it is considered as a
"traditional" OpenSSL value, and the variables LIBDIR and libdir will
be this:
LIBDIR=relativepath
libdir=$(INSTALLTOP)/$(LIBDIR)
Fixes #5398
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5446)
Diffstat (limited to 'Configurations/windows-makefile.tmpl')
-rw-r--r-- | Configurations/windows-makefile.tmpl | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl index 719397239d..2f6426d1f9 100644 --- a/Configurations/windows-makefile.tmpl +++ b/Configurations/windows-makefile.tmpl @@ -142,7 +142,7 @@ OPENSSLDIR_dev={- # $openssldir_dev -} OPENSSLDIR_dir={- canonpath($openssldir_dir) -} LIBDIR={- our $libdir = $config{libdir} || "lib"; - $libdir -} + file_name_is_absolute($libdir) ? "" : $libdir -} ENGINESDIR_dev={- use File::Spec::Functions qw(:DEFAULT splitpath); our $enginesdir = catdir($prefix,$libdir,"engines-$sover_dirname"); our ($enginesdir_dev, $enginesdir_dir, $enginesdir_file) = @@ -159,6 +159,10 @@ OPENSSLDIR=$(OPENSSLDIR_dev)$(OPENSSLDIR_dir) ENGINESDIR=$(ENGINESDIR_dev)$(ENGINESDIR_dir) !ENDIF +# $(libdir) is chosen to be compatible with the GNU coding standards +libdir={- file_name_is_absolute($libdir) + ? $libdir : '$(INSTALLTOP)\$(LIBDIR)' -} + CC={- $config{cc} -} CPP={- $config{cpp} -} CPPFLAGS={- our $cppflags = join(" ", @@ -324,12 +328,10 @@ install_dev: "$(INSTALLTOP)\include\openssl" @"$(PERL)" "$(SRCDIR)\util\copy.pl" $(BLDDIR)\include\openssl\*.h \ "$(INSTALLTOP)\include\openssl" - @"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(INSTALLTOP)\$(LIBDIR)" - @"$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_LIBS) \ - "$(INSTALLTOP)\$(LIBDIR)" + @"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(libdir)" + @"$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_LIBS) "$(libdir)" @if "$(SHLIBS)"=="" \ - "$(PERL)" "$(SRCDIR)\util\copy.pl" ossl_static.pdb \ - "$(INSTALLTOP)\$(LIBDIR)" + "$(PERL)" "$(SRCDIR)\util\copy.pl" ossl_static.pdb "$(libdir)" uninstall_dev: |