1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-25 21:42:33 +03:00
postgres/src/tools/msvc/install.pl
Andrew Dunstan 1a6244216d Fix included file path for modern perl
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.
2019-02-05 19:34:00 -05:00

38 lines
722 B
Perl
Executable File

#
# Script that provides 'make install' functionality for msvc builds
#
# src/tools/msvc/install.pl
#
use strict;
use warnings;
use File::Basename;
use File::Spec;
BEGIN { use lib File::Spec->rel2abs(dirname(__FILE__)); }
use Install qw(Install);
# buildenv.pl is for specifying the build environment settings
# it should contain lines like:
# $ENV{PATH} = "c:/path/to/bison/bin;$ENV{PATH}";
if (-e "src/tools/msvc/buildenv.pl")
{
do "./src/tools/msvc/buildenv.pl";
}
elsif (-e "./buildenv.pl")
{
do "./buildenv.pl";
}
my $target = shift || Usage();
my $insttype = shift;
Install($target, $insttype);
sub Usage
{
print "Usage: install.pl <targetdir> [installtype]\n";
print "installtype: client\n";
exit(1);
}