Configure: Implement attributes for DEPEND[xxx]
authorRichard Levitte <levitte@openssl.org>
Thu, 3 Oct 2019 22:00:24 +0000 (00:00 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 10 Oct 2019 12:12:15 +0000 (14:12 +0200)
We want to attach attributes on dependencies.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10088)

Configure

index 9185f5dccc22c1f18bc51d2a021ca6102539f927..7ea13c1a5148ee4d0b4554f0a46b977a61da42f2 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -1922,10 +1922,17 @@ if ($builder eq "unified") {
             => sub { push @{$defines{$expand_variables->($+{INDEX})}},
                          tokenize($expand_variables->($+{VALUE}))
                          if !@skip || $skip[$#skip] > 0 },
-            qr/^\s* DEPEND ${index_re} = ${value_re} $/x
-            => sub { push @{$depends{$expand_variables->($+{INDEX})}},
-                         tokenize($expand_variables->($+{VALUE}))
-                         if !@skip || $skip[$#skip] > 0 },
+            qr/^\s* DEPEND ${index_re} ${attribs_re} = ${value_re} $/x
+            => sub {
+                if (!@skip || $skip[$#skip] > 0) {
+                    my $i = $expand_variables->($+{INDEX});
+                    my @d = tokenize($expand_variables->($+{VALUE}));
+                    push @{$depends{$i}}, @d;
+                    $handle_attributes->($+{ATTRIBS},
+                                         \$attributes{depends}->{$i},
+                                         @d);
+                }
+            },
             qr/^\s* GENERATE ${index_re} = ${value_re} $/x
             => sub { push @{$generate{$expand_variables->($+{INDEX})}},
                          $+{VALUE}
@@ -2096,6 +2103,11 @@ EOF
                 my $e = $1 // "";
                 $d = $`.$e;
                 $unified_info{depends}->{$ddest}->{$d} = 1;
+
+                # Fix up associated attributes
+                $unified_info{attributes}->{depends}->{$ddest}->{$d} =
+                    $attributes{depends}->{$dest}->{$_}
+                    if defined $attributes{depends}->{$dest}->{$_};
             }
         }