1 # -*-perl-*- hey - emacs - this is a perl file
3 # src/tools/msvc/build.pl
8 chdir("../../..") if (-d "../msvc" && -d "../../../src");
12 use lib "src/tools/msvc";
18 # buildenv.pl is for specifying the build environment settings
19 # it should contain lines like:
20 # $ENV{PATH} = "c:/path/to/bison/bin;$ENV{PATH}";
22 if (-e "src/tools/msvc/buildenv.pl")
24 require "src/tools/msvc/buildenv.pl";
26 elsif (-e "./buildenv.pl")
28 require "./buildenv.pl";
33 require "config_default.pl";
34 require "config.pl" if (-f "src/tools/msvc/config.pl");
36 my $vcver = Mkvcbuild::mkvcbuild($config);
38 # check what sort of build we are doing
40 my $bconf = $ENV{CONFIG} || "Release";
41 my $buildwhat = $ARGV[1] || "";
42 if (uc($ARGV[0]) eq 'DEBUG')
46 elsif (uc($ARGV[0]) ne "RELEASE")
48 $buildwhat = $ARGV[0] || "";
53 if ($buildwhat and $vcver >= 10.00)
56 "msbuild $buildwhat.vcxproj /verbosity:normal /p:Configuration=$bconf");
60 system("vcbuild $buildwhat.vcproj $bconf");
64 system("msbuild pgsql.sln /verbosity:normal /p:Configuration=$bconf");