Configuration: Don't have shared libraries depend on themselves
authorRichard Levitte <levitte@openssl.org>
Wed, 23 Sep 2020 15:59:39 +0000 (17:59 +0200)
committerRichard Levitte <levitte@openssl.org>
Fri, 25 Sep 2020 08:08:41 +0000 (10:08 +0200)
The NonStop config attributes mean that there's no separate "simple"
and "full" shared library name, they are the same.  Because we assumed
that they would always differ, we ended up with this dependency:

    libcrypto.so: libcrypto.so

A simple fix was all that was needed to clear that.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12960)

Configurations/unix-Makefile.tmpl

index 20fe46e337fbb63a6bf84e470888a32c6309d92a..ac19141a95671689ee21e1586763c6550132209e 100644 (file)
@@ -1472,19 +1472,22 @@ EOF
       my $fullobjs =
           join(" \\\n\t\t", fill_lines(' ', $COLUMNS - 16, @fullobjs));
 
-      my $recipe = <<"EOF";
+      my $recipe = '';
+
+      if ($simple ne $full) {
+          if (sharedaix()) {
+              $recipe .= <<"EOF";
 $simple: $full
-EOF
-      if (sharedaix()) {
-          $recipe .= <<"EOF";
        rm -f $simple && \\
        \$(AR) r $simple $full
 EOF
-      } elsif ($simple ne $full) {
-          $recipe .= <<"EOF";
+          } else {
+              $recipe .= <<"EOF";
+$simple: $full
        rm -f $simple && \\
        ln -s $full $simple
 EOF
+          }
       }
       $recipe .= <<"EOF";
 $full: $fulldeps