[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Thu Mar 17 18:08:19 UTC 2016


The branch master has been updated
       via  2b6b606c7b9db8bfde3bd0aaa90b19049f8f6311 (commit)
      from  a7e7bad1681e2607ba59855a3c9215df64b278c0 (commit)


- Log -----------------------------------------------------------------
commit 2b6b606c7b9db8bfde3bd0aaa90b19049f8f6311
Author: Richard Levitte <levitte at openssl.org>
Date:   Thu Mar 10 00:04:04 2016 +0100

    Added build.info debugging capability to Configure
    
    This is only enabled when the environment variable
    CONFIGURE_DEBUG_BUILDINFO is defined.  This will cause every line in
    every build.info file to be displayed, along with the content of the
    skip stack before and after parsing.  This can be a very powerful tool
    to see that all conditions are working as expected.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 Configure | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/Configure b/Configure
index a4aac21..87a46a9 100755
--- a/Configure
+++ b/Configure
@@ -1221,6 +1221,7 @@ push @{$config{openssl_other_defines}}, "OPENSSL_NO_AFALGENG" if ($disabled{afal
 # If we use the unified build, collect information from build.info files
 my %unified_info = ();
 
+my $buildinfo_debug = defined($ENV{CONFIGURE_DEBUG_BUILDINFO});
 if ($builder eq "unified") {
     # Store the name of the template file we will build the build file from
     # in %config.  This may be useful for the build file itself.
@@ -1415,7 +1416,18 @@ if ($builder eq "unified") {
                 }
             },
             qr/^(?:#.*|\s*)$/ => sub { },
-            "OTHERWISE" => sub { die "Something wrong with this line:\n$_\nat $sourced/$f" }
+            "OTHERWISE" => sub { die "Something wrong with this line:\n$_\nat $sourced/$f" },
+            "BEFORE" => sub {
+                if ($buildinfo_debug) {
+                    print STDERR "DEBUG: Parsing ",join(" ", @_),"\n";
+                    print STDERR "DEBUG: ... before parsing, skip stack is ",join(" ", map { int($_) } @skip),"\n";
+                }
+            },
+            "AFTER" => sub {
+                if ($buildinfo_debug) {
+                    print STDERR "DEBUG: .... after parsing, skip stack is ",join(" ", map { int($_) } @skip),"\n";
+                }
+            },
             );
         die "runaway IF?" if (@skip);
 
@@ -2453,8 +2465,11 @@ sub collect_information {
     while(defined($_ = $lineiterator->())) {
         s|\R$||;
         my $found = 0;
+        if ($collectors{"BEFORE"}) {
+            $collectors{"BEFORE"}->($_);
+        }
         foreach my $re (keys %collectors) {
-            if ($re ne "OTHERWISE" && /$re/) {
+            if ($re !~ /^OTHERWISE|BEFORE|AFTER$/ && /$re/) {
                 $collectors{$re}->($lineiterator);
                 $found = 1;
             };
@@ -2463,5 +2478,8 @@ sub collect_information {
             $collectors{"OTHERWISE"}->($lineiterator, $_)
                 unless $found || !defined $collectors{"OTHERWISE"};
         }
+        if ($collectors{"AFTER"}) {
+            $collectors{"AFTER"}->($_);
+        }
     }
 }


More information about the openssl-commits mailing list