Skip to content

Commit 8dfc7d8

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/16343-f638f67e7e52b86c@postgresql.org Backpatch-through: 9.5
1 parent 7adbd25 commit 8dfc7d8

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/tools/msvc/Install.pm

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,16 @@ sub Install
6262
do "./config.pl" if (-f "config.pl");
6363
}
6464

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

0 commit comments

Comments
 (0)