Configurations/windows-makefile.tmpl: expand environments early.
authorAndy Polyakov <appro@openssl.org>
Fri, 6 May 2016 10:45:50 +0000 (12:45 +0200)
committerAndy Polyakov <appro@openssl.org>
Mon, 9 May 2016 08:40:56 +0000 (10:40 +0200)
If environment variables are not explanded early enough, expanded
strings are passed with single backslash to C compiler, e.g.
C:\Program Files, which effectively results in OpenSSL looking for
engines and certificates in C:Program Files.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Configurations/windows-makefile.tmpl

index 159d57c93165b4db331add85c464815a21247ace..887b7a2bea01993f66b52ead682a7579f2560dcb 100644 (file)
      ? "CommonProgramFiles(x86)" : "CommonProgramW6432";
  our $win_installroot =
      defined($ENV{$win_installenv})
-     ? '%'.$win_installenv.'%' : '%ProgramFiles%';
+     ? $win_installenv : 'ProgramFiles';
  our $win_commonroot =
      defined($ENV{$win_commonenv})
-     ? '%'.$win_commonenv.'%' : '%CommonProgramFiles%';
+     ? $win_commonenv : 'CommonProgramFiles';
+
+ # expand variables early
+ $win_installroot = $ENV{$win_installroot};
+ $win_commonroot = $ENV{$win_commonroot};
 
  sub shlib {
      return () if $disabled{shared};