[openssl-commits] [openssl] OpenSSL_1_1_0-stable update

Richard Levitte levitte at openssl.org
Tue Aug 30 04:07:23 UTC 2016


The branch OpenSSL_1_1_0-stable has been updated
       via  b2d10958a3f2ffcf71d075786ce0b5f88ba4d57c (commit)
       via  b9b364488169e2f6b9508003a7eb2907cc2598be (commit)
       via  eac33e1cd3a45ab0d66be20a01ee9a5c0634781b (commit)
       via  b7fa463ff846223abc23a70c76848f97ce82e8f2 (commit)
      from  2aca84ffadaaafe9ed9cccaeef09ea15574994a5 (commit)


- Log -----------------------------------------------------------------
commit b2d10958a3f2ffcf71d075786ce0b5f88ba4d57c
Author: Richard Levitte <levitte at openssl.org>
Date:   Mon Aug 29 22:11:36 2016 +0200

    Configure: save away the value of OPENSSL_LOCAL_CONFIG_DIR for reconf
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (cherry picked from commit ee4cdb7fdbdc46f931cb6e2eca109cc92832eb33)

commit b9b364488169e2f6b9508003a7eb2907cc2598be
Author: Richard Levitte <levitte at openssl.org>
Date:   Mon Aug 29 21:48:12 2016 +0200

    Configure: Redo the logic for finding build file templates
    
    Build file templates would be looked up like this if the user gave us
    an additional directory to look for configuration files and build file
    templates:
    
        $OPENSSL_LOCAL_CONFIG_DIR/$OSTYPE-Makefile.tmpl
        $SOURCEDIR/Configurations/$OSTYPE-Makefile.tmpl
        $OPENSSL_LOCAL_CONFIG_DIR/Makefile.tmpl
        $SOURCEDIR/Configurations/Makefile.tmpl
    
    So for example, if the user created his own Makefile.tmpl and tried to
    use it with a unixly config, it would never be user because we have a
    unix-Makefile.tmpl in our Configurations directory.  This is clearly
    wrong, and this change makes it look in this order instead:
    
        $OPENSSL_LOCAL_CONFIG_DIR/$OSTYPE-Makefile.tmpl
        $OPENSSL_LOCAL_CONFIG_DIR/Makefile.tmpl
        $SOURCEDIR/Configurations/$OSTYPE-Makefile.tmpl
        $SOURCEDIR/Configurations/Makefile.tmpl
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (cherry picked from commit 79822c3cd55b9241187123fd016cb3c9a3beffbb)

commit eac33e1cd3a45ab0d66be20a01ee9a5c0634781b
Author: Richard Levitte <levitte at openssl.org>
Date:   Mon Aug 29 21:46:29 2016 +0200

    Configure: clean away temporary section of code
    
    We've done away with Makefile as source of information and now use
    configdata.pm exclusively.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (cherry picked from commit acc63c7d6d4ea28497a6192a3445b40f2af88133)

commit b7fa463ff846223abc23a70c76848f97ce82e8f2
Author: Richard Levitte <levitte at openssl.org>
Date:   Mon Aug 29 21:45:19 2016 +0200

    Make it possible for the user to specify a different default build file
    
    Make sure the information is kept for reconfiguration too.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (cherry picked from commit 8b5156d18855f536cf5ceac10f5781e19fa8f1ea)

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

Summary of changes:
 Configure | 144 ++++++++++++++++++++++++++++++++------------------------------
 1 file changed, 74 insertions(+), 70 deletions(-)

diff --git a/Configure b/Configure
index 3604ba4..b88f6aa 100755
--- a/Configure
+++ b/Configure
@@ -184,6 +184,45 @@ my $local_config_envname = 'OPENSSL_LOCAL_CONFIG_DIR';
 $config{sourcedir} = abs2rel($srcdir);
 $config{builddir} = abs2rel($blddir);
 
+# Collect reconfiguration information if needed
+my @argvcopy=@ARGV;
+
+if (grep /^reconf(igure)?$/, @argvcopy) {
+    if (-f "./configdata.pm") {
+	my $file = "./configdata.pm";
+	unless (my $return = do $file) {
+	    die "couldn't parse $file: $@" if $@;
+            die "couldn't do $file: $!"    unless defined $return;
+            die "couldn't run $file"       unless $return;
+	}
+
+	@argvcopy = defined($configdata::config{perlargv}) ?
+	    @{$configdata::config{perlargv}} : ();
+	die "Incorrect data to reconfigure, please do a normal configuration\n"
+	    if (grep(/^reconf/, at argvcopy));
+	$ENV{CROSS_COMPILE} = $configdata::config{cross_compile_prefix}
+	    if defined($configdata::config{cross_compile_prefix});
+	$ENV{CC} = $configdata::config{cc}
+	    if defined($configdata::config{cc});
+	$ENV{BUILDFILE} = $configdata::config{build_file}
+	    if defined($configdata::config{build_file});
+	$ENV{$local_config_envname} = $configdata::config{local_config_dir}
+	    if defined($configdata::config{local_config_dir});
+
+	print "Reconfiguring with: ", join(" ", at argvcopy), "\n";
+	print "    CROSS_COMPILE = ",$ENV{CROSS_COMPILE},"\n"
+	    if $ENV{CROSS_COMPILE};
+	print "    CC = ",$ENV{CC},"\n" if $ENV{CC};
+	print "    BUILDFILE = ",$ENV{BUILDFILE},"\n" if $ENV{BUILDFILE};
+	print "    $local_config_envname = ",$ENV{$local_config_envname},"\n"
+	    if $ENV{$local_config_envname};
+    } else {
+	die "Insufficient data to reconfigure, please do a normal configuration\n";
+    }
+}
+
+$config{perlargv} = [ @argvcopy ];
+
 # Collect version numbers
 $config{version} = "unknown";
 $config{version_num} = "unknown";
@@ -483,58 +522,6 @@ my $target="";
 $config{options}="";
 $config{build_type} = "release";
 
-my @argvcopy=@ARGV;
-
-if (grep /^reconf(igure)?$/, @argvcopy) {
-    if (-f "./configdata.pm") {
-	my $file = "./configdata.pm";
-	unless (my $return = do $file) {
-	    die "couldn't parse $file: $@" if $@;
-            die "couldn't do $file: $!"    unless defined $return;
-            die "couldn't run $file"       unless $return;
-	}
-
-	@argvcopy = defined($configdata::config{perlargv}) ?
-	    @{$configdata::config{perlargv}} : ();
-	die "Incorrect data to reconfigure, please do a normal configuration\n"
-	    if (grep(/^reconf/, at argvcopy));
-	$ENV{CROSS_COMPILE} = $configdata::config{cross_compile_prefix}
-	    if defined($configdata::config{cross_compile_prefix});
-	$ENV{CC} = $configdata::config{cc}
-	    if defined($configdata::config{cc});
-
-	print "Reconfiguring with: ", join(" ", at argvcopy), "\n";
-	print "    CROSS_COMPILE = ",$ENV{CROSS_COMPILE},"\n"
-	    if $ENV{CROSS_COMPILE};
-	print "    CC = ",$ENV{CC},"\n" if $ENV{CC};
-    } elsif (open IN, "<Makefile") {
-        #
-        # THIS SECTION IS TEMPORARY, it helps transitioning from Makefile
-        # centered information gathering the reading configdata.pm
-        #
-        while (<IN>) {
-            s|\R$||;
-            if (/^CONFIGURE_ARGS=\s*(.*)\s*/) {
-                # Older form, we split the string and hope for the best
-                @argvcopy = split /\s+/, $_;
-                die "Incorrect data to reconfigure, please do a normal configuration\n"
-                    if (grep(/^reconf/, at argvcopy));
-            } elsif (/^CROSS_COMPILE=\s*(.*)/) {
-                $ENV{CROSS_COMPILE}=$1;
-            } elsif (/^CC=\s*(?:\$\(CROSS_COMPILE\))?(.*?)$/) {
-                $ENV{CC}=$1;
-            }
-        }
-        #
-        # END OF TEMPORARY SECTION
-        #
-    } else {
-	die "Insufficient data to reconfigure, please do a normal configuration\n";
-    }
-}
-
-$config{perlargv} = [ @argvcopy ];
-
 my %unsupported_options = ();
 my %deprecated_options = ();
 foreach (@argvcopy)
@@ -938,8 +925,12 @@ $target{nm} =      $ENV{'NM'}      || $target{nm}      || "nm";
 $target{rc} =
     $ENV{'RC'}  || $ENV{'WINDRES'} || $target{rc}      || "windres";
 
-# Cache the C compiler command for reconfiguration
+# Allow overriding the build file name
+$target{build_file} = $ENV{BUILDFILE} || $target{build_file} || "Makefile";
+
+# Cache information necessary for reconfiguration
 $config{cc} = $target{cc};
+$config{build_file} = $target{build_file};
 
 # For cflags, lflags, plib_lflags, ex_libs and defines, add the debug_
 # or release_ attributes.
@@ -1297,26 +1288,39 @@ 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.
-    my $build_file_template;
-
-    for my $filename (( $builder_platform."-".$target{build_file}.".tmpl",
-                        $target{build_file}.".tmpl" )) {
-        if (defined $ENV{$local_config_envname}) {
-            if ($^O eq 'VMS') {
-                # VMS environment variables are logical names,
-                # which can be used as is
-                $build_file_template = $local_config_envname . ':' . $filename;
-            } else {
-                $build_file_template = catfile($ENV{$local_config_envname},
-                                               $filename);
-            }
-        }
+    my @build_file_template_names =
+	( $builder_platform."-".$target{build_file}.".tmpl",
+	  $target{build_file}.".tmpl" );
+    my @build_file_templates = ();
+
+    # First, look in the user provided directory, if given
+    if (defined $ENV{$local_config_envname}) {
+	@build_file_templates =
+	    map {
+		if ($^O eq 'VMS') {
+		    # VMS environment variables are logical names,
+		    # which can be used as is
+		    $local_config_envname . ':' . $_;
+		} else {
+		    catfile($ENV{$local_config_envname}, $_);
+		}
+	    }
+	    @build_file_template_names;
+    }
+    # Then, look in our standard directory
+    push @build_file_templates,
+	( map { catfile($srcdir, "Configurations", $_) }
+	  @build_file_template_names );
 
+    my $build_file_template;
+    for $_ (@build_file_templates) {
+	$build_file_template = $_;
         last if -f $build_file_template;
 
-        $build_file_template = catfile($srcdir, "Configurations", $filename);
-
-        last if -f $build_file_template;
+        $build_file_template = undef;
+    }
+    if (!defined $build_file_template) {
+	die "*** Couldn't find any of:\n", join("\n", @build_file_templates), "\n";
     }
     $config{build_file_template} = $build_file_template;
 


More information about the openssl-commits mailing list