When a relation is moved to another tablespace, we can't assume that we can
[PostgreSQL.git] / src / tools / msvc / build.pl
blob2654c86497c2091cf1beb2a61e9ff025c4040d38
2 # -*-perl-*- hey - emacs - this is a perl file
4 # $PostgreSQL$
6 BEGIN
9 chdir("../../..") if (-d "../msvc" && -d "../../../src");
13 use lib "src/tools/msvc";
15 use Cwd;
17 use Mkvcbuild;
19 # buildenv.pl is for specifying the build environment settings
20 # it should contain lines like:
21 # $ENV{PATH} = "c:/path/to/bison/bin;$ENV{PATH}";
23 if ( -e "src/tools/msvc/buildenv.pl")
25 require "src/tools/msvc/buildenv.pl";
27 elsif (-e "./buildenv.pl" )
29 require "./buildenv.pl";
33 # set up the project
34 our $config;
35 require "config.pl";
37 Mkvcbuild::mkvcbuild($config);
39 # check what sort of build we are doing
41 my $bconf = $ENV{CONFIG} || "Release";
42 my $buildwhat = $ARGV[1] || "";
43 if ($ARGV[0] eq 'DEBUG')
45 $bconf = "Debug";
47 elsif ($ARGV[0] ne "RELEASE")
49 $buildwhat = $ARGV[0] || "";
52 # ... and do it
54 if ($buildwhat)
56 system("vcbuild $buildwhat.vcproj $bconf");
58 else
60 system("msbuild pgsql.sln /verbosity:detailed /p:Configuration=$bconf");
63 # report status
65 $status = $? >> 8;
67 exit $status;