Change the INSTALL documentation for unified builds
[openssl.git] / Configure
index da9e5a3979525b262b588f9f9065ebc57ce3b7b2..cfd8be0e6401d83daa226fa2c60f11e5d4bb8950 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -280,6 +280,7 @@ my @disablables = (
     "md5",
     "mdc2",
     "md[-_]ghost94",
     "md5",
     "mdc2",
     "md[-_]ghost94",
+    "multiblock",
     "nextprotoneg",
     "ocb",
     "ocsp",
     "nextprotoneg",
     "ocb",
     "ocsp",
@@ -437,7 +438,6 @@ my $no_sse2=0;
 
 my $user_cflags="";
 my @user_defines=();
 
 my $user_cflags="";
 my @user_defines=();
-my $unified = 0;
 $config{openssl_api_defines}=[];
 $config{openssl_algorithm_defines}=[];
 $config{openssl_thread_defines}=[];
 $config{openssl_api_defines}=[];
 $config{openssl_algorithm_defines}=[];
 $config{openssl_thread_defines}=[];
@@ -448,6 +448,8 @@ my $target="";
 $config{options}="";
 $config{build_type} = "release";
 
 $config{options}="";
 $config{build_type} = "release";
 
+my $classic = 0;
+
 my @argvcopy=@ARGV;
 
 if (grep /^reconf(igure)?$/, @argvcopy) {
 my @argvcopy=@ARGV;
 
 if (grep /^reconf(igure)?$/, @argvcopy) {
@@ -631,9 +633,9 @@ foreach (@argvcopy)
                }
        elsif (/^[-+]/)
                {
                }
        elsif (/^[-+]/)
                {
-               if (/^--unified$/)
+               if (/^--classic$/)
                        {
                        {
-                       $unified=1;
+                       $classic=1;
                        }
                elsif (/^--prefix=(.*)$/)
                        {
                        }
                elsif (/^--prefix=(.*)$/)
                        {
@@ -890,14 +892,20 @@ $config{shared_ldflag} = "";
 $target{build_scheme} = [ $target{build_scheme} ]
     if ref($target{build_scheme}) ne "ARRAY";
 
 $target{build_scheme} = [ $target{build_scheme} ]
     if ref($target{build_scheme}) ne "ARRAY";
 
-###### TO BE REMOVED BEFORE FINAL RELEASE
+###### TO BE REMOVED WHEN CLASSIC BUILD IS REMOVED
 ######
 ######
-###### If the user has chosen --unified, we give it to them.
-###### The same happens if we detect that they try to build out-of-source.
-if ($target{build_file} eq "Makefile"
-    && $target{build_scheme}->[0] eq "unixmake"
-    && ($unified || $srcdir ne $blddir)) {
-    $target{build_scheme} = [ "unified", "unix" ];
+###### If the user has chosen --classic, we give it to them.
+###### If they try that with an out-of-source config, we complain.
+if ($target{build_scheme}->[0] eq "unified" && $classic) {
+    die "Can't perform a classic build out of source tree\n"
+        if $srcdir ne $blddir;
+
+    $target{build_scheme} = { unix    => [ "unixmake" ],
+                              windows => [ "mk1mf", $target{build_scheme}->[2] ],
+                              VMS     => undef } -> {$target{build_scheme}->[1]};
+
+    die "Classic mode unavailable on this platform\n"
+        unless defined($target{build_scheme});
 }
 
 my ($builder, $builder_platform, @builder_opts) =
 }
 
 my ($builder, $builder_platform, @builder_opts) =
@@ -1274,6 +1282,7 @@ if ($builder eq "unified") {
         my @engines = ();
         my @scripts = ();
         my @extra = ();
         my @engines = ();
         my @scripts = ();
         my @extra = ();
+        my @overrides = ();
         my @intermediates = ();
         my @rawlines = ();
 
         my @intermediates = ();
         my @rawlines = ();
 
@@ -1342,6 +1351,9 @@ if ($builder eq "unified") {
             qr/^\s*EXTRA\s*=\s*(.*)\s*$/
             => sub { push @extra, split(/\s+/, $1)
                          if !@skip || $skip[$#skip] > 0 },
             qr/^\s*EXTRA\s*=\s*(.*)\s*$/
             => sub { push @extra, split(/\s+/, $1)
                          if !@skip || $skip[$#skip] > 0 },
+            qr/^\s*OVERRIDES\s*=\s*(.*)\s*$/
+            => sub { push @overrides, split(/\s+/, $1)
+                         if !@skip || $skip[$#skip] > 0 },
 
             qr/^\s*ORDINALS\[((?:\\.|[^\\\]])+)\]\s*=\s*(.*)\s*$/,
             => sub { push @{$ordinals{$1}}, split(/\s+/, $2)
 
             qr/^\s*ORDINALS\[((?:\\.|[^\\\]])+)\]\s*=\s*(.*)\s*$/,
             => sub { push @{$ordinals{$1}}, split(/\s+/, $2)
@@ -1440,6 +1452,11 @@ EOF
             $unified_info{extra}->{$extra} = 1;
         }
 
             $unified_info{extra}->{$extra} = 1;
         }
 
+        foreach (@overrides) {
+            my $override = cleanfile($buildd, $_, $blddir);
+            $unified_info{overrides}->{$override} = 1;
+        }
+
         push @{$unified_info{rawlines}}, @rawlines;
 
         unless ($disabled{shared}) {
         push @{$unified_info{rawlines}}, @rawlines;
 
         unless ($disabled{shared}) {
@@ -1583,7 +1600,7 @@ EOF
 
     ### Make unified_info a bit more efficient
     # One level structures
 
     ### Make unified_info a bit more efficient
     # One level structures
-    foreach (("programs", "libraries", "engines", "scripts", "extra")) {
+    foreach (("programs", "libraries", "engines", "scripts", "extra", "overrides")) {
         $unified_info{$_} = [ sort keys %{$unified_info{$_}} ];
     }
     # Two level structures
         $unified_info{$_} = [ sort keys %{$unified_info{$_}} ];
     }
     # Two level structures
@@ -1903,39 +1920,6 @@ or position independent code, please let us know (but please first make sure
 you have tried with a current version of OpenSSL).
 EOF
 
 you have tried with a current version of OpenSSL).
 EOF
 
-###### TO BE REMOVED BEFORE FINAL RELEASE
-######
-###### If the user hasn't chosen --unified, try to nudge them.
-if ($target{build_file} eq "Makefile"
-    && $target{build_scheme}->[0] eq "unixmake"
-    && !$unified) {
-
-    my $plausible_builddir =
-        abs2rel(rel2abs("../_openssl-build_$target"),rel2abs("."));
-    my $plausible_to_sourcedir =
-        abs2rel(rel2abs("."),rel2abs("../_openssl-build_$target"));
-    print <<"EOF";
-
-----------------------------------------------------------------------
-Please consider configuring with the flag --unified .
-It's to test out a new "unified" building system.
-
-One cool feature is that you can have your build directory elsewhere,
-for example:
-
-    make clean          # Clean the current configuration away
-    mkdir $plausible_builddir
-    cd $plausible_builddir
-    $plausible_to_sourcedir/config --unified
-    make
-    make test
-
-Please report any problem you have.
-----------------------------------------------------------------------
-
-EOF
-}
-
 exit(0);
 
 ######################################################################
 exit(0);
 
 ######################################################################