Commit 6a145a32 authored by Andy Polyakov's avatar Andy Polyakov
Browse files

Configurations/windows-makefile.tmpl: simplify install-path "flavour"-ing.



$target{build_scheme} consists of fixed number of elements with 3rd
element denoting VC install-path "flavour", i.e. where to install things.
Instead of looking at 3rd, let's look at last. This allows to override
flavour from template in a simple way.

Configurations/10-main.conf: define generic "flavour" in VC-common
template. Since VC-W32 was the only recognized "flavour", remove
"flavour" definitions from all targets/templates, but VC-WIN32. And
rename VC-W32 to VC-WOW.

Reviewed-by: default avatarRichard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5502)
parent c059564a
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1386,6 +1386,8 @@ my %targets = (
        thread_scheme    => "winthreads",
        dso_scheme       => "win32",
        apps_aux_src     => add("win32_init.c"),
        # additional parameter to build_scheme denotes install-path "flavour"
        build_scheme     => add("VC-common", { separator => undef }),
    },
    "VC-noCE-common" => {
        inherit_from     => [ "VC-common" ],
@@ -1434,7 +1436,6 @@ my %targets = (
            return join(" ", @_, @ex_libs);
        }),
        bn_ops           => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
        build_scheme     => add("VC-W64", { separator => undef }),
    },
    "VC-WIN64I" => {
        inherit_from     => [ "VC-WIN64-common", asm("ia64_asm"),
@@ -1484,7 +1485,9 @@ my %targets = (
        sys_id           => "WIN32",
        bn_ops           => "BN_LLONG EXPORT_VAR_AS_FN",
        perlasm_scheme   => sub { vc_win32_info()->{perlasm_scheme} },
        build_scheme     => add("VC-W32", { separator => undef }),
        # "WOW" stands for "Windows on Windows", and "VC-WOW" engages
        # some installation path heuristics in windows-makefile.tmpl...
        build_scheme     => add("VC-WOW", { separator => undef }),
    },
    "VC-CE" => {
        inherit_from     => [ "VC-common" ],
@@ -1539,7 +1542,6 @@ my %targets = (
                if (env('TARGETCPU') eq "X86");
            return @ex_libs;
        }),
        build_scheme     => add("VC-WCE", { separator => undef }),
    },

#### MinGW
+8 −8
Original line number Diff line number Diff line
@@ -14,18 +14,18 @@

 (our $sover_dirname = $config{shlib_version_number}) =~ s|\.|_|g;

 my $build_scheme = $target{build_scheme};
 my $install_flavour = $build_scheme->[$#$build_scheme]; # last element
 my $win_installenv =
     $target{build_scheme}->[2] eq "VC-W32" ?
     "ProgramFiles(x86)" : "ProgramW6432";
     $install_flavour eq "VC-WOW" ? "ProgramFiles(x86)"
                                  : "ProgramW6432";
 my $win_commonenv =
     $target{build_scheme}->[2] eq "VC-W32"
     ? "CommonProgramFiles(x86)" : "CommonProgramW6432";
     $install_flavour eq "VC-WOW" ? "CommonProgramFiles(x86)"
                                  : "CommonProgramW6432";
 our $win_installroot =
     defined($ENV{$win_installenv})
     ? $win_installenv : 'ProgramFiles';
     defined($ENV{$win_installenv}) ? $win_installenv : 'ProgramFiles';
 our $win_commonroot =
     defined($ENV{$win_commonenv})
     ? $win_commonenv : 'CommonProgramFiles';
     defined($ENV{$win_commonenv}) ? $win_commonenv : 'CommonProgramFiles';

 # expand variables early
 $win_installroot = $ENV{$win_installroot};