Contrary to the comment on
772d4b76, only paths starting with "./" or
"../" are considered relative to the current working directory by perl's
"do" function. So this patch converts all the relevant cases to use "./"
paths. This only affects MSVC.
Backpatch to all live branches.
# suppress warning about harmless redeclaration of $config
no warnings 'misc';
- do "config_default.pl";
- do "config.pl" if (-f "config.pl");
+ do "./config_default.pl";
+ do "./config.pl" if (-f "config.pl");
}
chdir("../../..") if (-f "../../../configure");
if (-e "src/tools/msvc/buildenv.pl")
{
- do "src/tools/msvc/buildenv.pl";
+ do "./src/tools/msvc/buildenv.pl";
}
elsif (-e "./buildenv.pl")
{
# set up the project
our $config;
-do "config_default.pl";
-do "config.pl" if (-f "src/tools/msvc/config.pl");
+do "./config_default.pl";
+do "./config.pl" if (-f "src/tools/msvc/config.pl");
my $vcver = Mkvcbuild::mkvcbuild($config);
if (-e "src/tools/msvc/buildenv.pl")
{
- do "src/tools/msvc/buildenv.pl";
+ do "./src/tools/msvc/buildenv.pl";
}
elsif (-e "./buildenv.pl")
{
unless (-f 'src/tools/msvc/config.pl');
our $config;
-do 'src/tools/msvc/config_default.pl';
-do 'src/tools/msvc/config.pl' if (-f 'src/tools/msvc/config.pl');
+do './src/tools/msvc/config_default.pl';
+do './src/tools/msvc/config.pl' if (-f 'src/tools/msvc/config.pl');
Mkvcbuild::mkvcbuild($config);
# assume we are in the postgres source root
-do 'src/tools/msvc/buildenv.pl' if -e 'src/tools/msvc/buildenv.pl';
+do './src/tools/msvc/buildenv.pl' if -e 'src/tools/msvc/buildenv.pl';
my ($bisonver) = `bison -V`; # grab first line
$bisonver = (split(/\s+/, $bisonver))[3]; # grab version number
# assume we are in the postgres source root
-do 'src/tools/msvc/buildenv.pl' if -e 'src/tools/msvc/buildenv.pl';
+do './src/tools/msvc/buildenv.pl' if -e 'src/tools/msvc/buildenv.pl';
my ($flexver) = `flex -V`; # grab first line
$flexver = (split(/\s+/, $flexver))[1];
my $topdir = getcwd();
my $tmp_installdir = "$topdir/tmp_install";
-do 'src/tools/msvc/config_default.pl';
-do 'src/tools/msvc/config.pl' if (-f 'src/tools/msvc/config.pl');
+do './src/tools/msvc/config_default.pl';
+do './src/tools/msvc/config.pl' if (-f 'src/tools/msvc/config.pl');
# buildenv.pl is for specifying the build environment settings
# it should contain lines like:
if (-e "src/tools/msvc/buildenv.pl")
{
- do "src/tools/msvc/buildenv.pl";
+ do "./src/tools/msvc/buildenv.pl";
}
my $what = shift || "";