Register the name of the config file each config target was found in
authorRichard Levitte <levitte@openssl.org>
Wed, 14 Sep 2016 20:21:41 +0000 (22:21 +0200)
committerRichard Levitte <levitte@openssl.org>
Fri, 16 Sep 2016 09:52:50 +0000 (11:52 +0200)
Reviewed-by: Andy Polyakov <appro@openssl.org>
Configure

index 36734d3bad8f61757f5ca0b333cc111786f050e9..9f95f77aa2ea8861b2d80dbb4e525c1e1c9b113f 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -921,6 +921,8 @@ my %target = resolve_config($target);
 
 &usage if (!%target || $target{template});
 
+my %conf_files = map { $_ => 1 } (@{$target{_conf_fname_int}});
+$config{conf_files} = [ sort keys %conf_files ];
 %target = ( %{$table{DEFAULTS}}, %target );
 
 $target{exe_extension}="";
@@ -2209,7 +2211,8 @@ sub read_config {
     close(CONFFILE);
     my %targets = ();
     {
-       local %table = %::table;    # Protect %table from tampering
+       # Protect certain tables from tampering
+       local %table = %::table;
 
        eval $content;
        warn $@ if $@;
@@ -2224,7 +2227,9 @@ sub read_config {
                warn "Misconfigured target configuration for $_ (should be a hash table), ignoring...\n";
            }
            delete $targets{$_};
-       }
+       } else {
+            $targets{$_}->{_conf_fname_int} = add([ $fname ]);
+        }
     }
 
     %table = (%table, %targets);