summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2020-05-21 14:41:40 +0900
committerMichael Paquier <michael@paquier.xyz>2020-05-21 14:41:40 +0900
commit57dc672c27bda0538895777d2e99ebc4ea9b23df (patch)
tree12032eed38c03d24e4087e47d920daa66b4b825d
parentbad73cb30ad8395120397073624ff35f21dad5c8 (diff)
Fix MSVC installations with multiple "configure" files detected
When installing binaries and libraries using the MSVC installation routines, the operation gets done after moving to the root folder, whose location is detected by checking if "configure" exists two times in a row. So, calling the installation script from src/tools/msvc/ with an extra "configure" file four levels up the root path of the code tree causes the execution to go further up, leading to a failure in finding the builds. This commit fixes the issue by moving to the root folder of the code tree only once, when necessary. Author: Arnold Müller Reviewed-by: Daniel Gustafsson Discussion: https://postgr.es/m/16343-f638f67e7e52b86c@postgresql.org Backpatch-through: 9.5
-rw-r--r--src/tools/msvc/Install.pm12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm
index 17a915496c3..014636101a0 100644
--- a/src/tools/msvc/Install.pm
+++ b/src/tools/msvc/Install.pm
@@ -62,8 +62,16 @@ sub Install
do "./config.pl" if (-f "config.pl");
}
- chdir("../../..") if (-f "../../../configure");
- chdir("../../../..") if (-f "../../../../configure");
+ # Move to the root path depending on the current location.
+ if (-f "../../../configure")
+ {
+ chdir("../../..");
+ }
+ elsif (-f "../../../../configure")
+ {
+ chdir("../../../..");
+ }
+
my $conf = "";
if (-d "debug")
{