Skip to content

Commit d2a9959

Browse files
committed
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/[email protected] Backpatch-through: 9.5
1 parent e1218f5 commit d2a9959

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/tools/msvc/Install.pm

+10-2
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,16 @@ sub Install
6363
do "./config.pl" if (-f "config.pl");
6464
}
6565

66-
chdir("../../..") if (-f "../../../configure");
67-
chdir("../../../..") if (-f "../../../../configure");
66+
# Move to the root path depending on the current location.
67+
if (-f "../../../configure")
68+
{
69+
chdir("../../..");
70+
}
71+
elsif (-f "../../../../configure")
72+
{
73+
chdir("../../../..");
74+
}
75+
6876
my $conf = "";
6977
if (-d "debug")
7078
{

0 commit comments

Comments
 (0)