diff options
author | Richard Levitte <levitte@openssl.org> | 2018-03-22 22:15:04 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2018-03-22 22:36:49 +0100 |
commit | 29f3cfddabfe448e9f5417ea228a99bb5e991017 (patch) | |
tree | 273354a136667c6830da45390132b03e72175e1b /Configurations | |
parent | 2a23cd7f5063c27c48357654c3e8b5b6f3855d1c (diff) |
Configurations/unix-Makefile.tmpl: fix inconsistencies with resource files
.res files weren't treated consistently. They weren't included at all
in the build of a shared library, and were named inconsistently; .res
sometimes, and .res.o otherwise. Now we standardise it to .res.o,
which is the recommended way with GNU tools.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5730)
Diffstat (limited to 'Configurations')
-rw-r--r-- | Configurations/unix-Makefile.tmpl | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index cb134e7931..cc66abe46d 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -110,7 +110,7 @@ GENERATED_MANDATORY={- join(" ", @{$unified_info{depends}->{""}} ) -} GENERATED={- join(" ", ( grep { defined $unified_info{generate}->{$_} } map { @{$unified_info{sources}->{$_}} } - grep { /\.o$/ } keys %{$unified_info{sources}} ), + grep { /\.(?:o|res)$/ } keys %{$unified_info{sources}} ), ( grep { /\.h$/ } keys %{$unified_info{generate}} )) -} INSTALL_LIBS={- join(" ", map { lib($_) } @{$unified_info{install}->{libraries}}) -} @@ -1060,10 +1060,10 @@ EOF my $linklibs = join("", map { my $f = basename($_); (my $l = $f) =~ s/^lib//; " -l$l" } @{$args{deps}}); - my @objs = map { (my $x = $_) =~ s|\.o$|$objext|; $x } - grep { $_ =~ m|\.o$| } + my @objs = map { (my $x = $_) =~ s|\.o$||; "$x$objext" } + grep { $_ !~ m/\.(?:def|map)$/ } @{$args{objs}}; - my @defs = grep { $_ =~ /\.(def|map)$/ } @{$args{objs}}; + my @defs = grep { $_ =~ /\.(?:def|map)$/ } @{$args{objs}}; my @deps = compute_lib_depends(@{$args{deps}}); die "More than one exported symbol map" if scalar @defs > 1; my $objs = join(" ", @objs); @@ -1122,7 +1122,9 @@ EOF my $linklibs = join("", map { my $f = basename($_); (my $l = $f) =~ s/^lib//; " -l$l" } @{$args{deps}}); - my @objs = map { (my $x = $_) =~ s|\.o$|$objext|; $x } @{$args{objs}}; + my @objs = map { (my $x = $_) =~ s|\.o$||; "$x$objext" } + grep { $_ !~ m/\.(?:def|map)$/ } + @{$args{objs}}; my @deps = compute_lib_depends(@{$args{deps}}); my $objs = join(" ", @objs); my $deps = join(" ", @deps); @@ -1150,7 +1152,7 @@ EOF my $bin = $args{bin}; my $bind = dirname($bin); my $binn = basename($bin); - my $objs = join(" ", map { (my $x = $_) =~ s|\.o$|$objext|; $x } + my $objs = join(" ", map { (my $x = $_) =~ s|\.o$||; "$x$objext" } @{$args{objs}}); my $deps = join(" ",compute_lib_depends(@{$args{deps}})); my @linkdirs = (); |