2006-09-15 23:42:02 +02:00
|
|
|
@echo off
|
2007-06-26 13:43:56 +02:00
|
|
|
REM $PostgreSQL: pgsql/src/tools/msvc/build.bat,v 1.9 2007/06/26 11:43:56 mha Exp $
|
2007-03-17 15:01:01 +01:00
|
|
|
|
2007-01-25 20:48:33 +01:00
|
|
|
SETLOCAL
|
2006-09-15 23:42:02 +02:00
|
|
|
SET STARTDIR=%CD%
|
2007-04-18 12:14:06 +02:00
|
|
|
SET CONFIG=
|
2007-01-16 22:43:19 +01:00
|
|
|
if exist src\tools\msvc\buildenv.bat call src\tools\msvc\buildenv.bat
|
|
|
|
if exist buildenv.bat call buildenv.bat
|
2006-09-15 23:42:02 +02:00
|
|
|
|
|
|
|
perl mkvcbuild.pl
|
|
|
|
if errorlevel 1 goto :eof
|
|
|
|
|
|
|
|
if exist ..\msvc if exist ..\..\..\src cd ..\..\..
|
2007-04-18 12:14:06 +02:00
|
|
|
set CFG=
|
|
|
|
if "%1" == "DEBUG" (
|
|
|
|
set CONFIG=Debug
|
|
|
|
set CFG=1
|
|
|
|
)
|
|
|
|
if "%1" == "RELEASE" (
|
|
|
|
set CONFIG=Release
|
|
|
|
set CFG=1
|
|
|
|
)
|
|
|
|
if "%CONFIG%" == "" set CONFIG=Release
|
|
|
|
|
|
|
|
if "%CFG%" == "1" shift
|
|
|
|
|
|
|
|
echo Building %CONFIG%
|
2006-09-15 23:42:02 +02:00
|
|
|
|
2007-01-10 04:54:35 +01:00
|
|
|
if "%1" == "" msbuild pgsql.sln /verbosity:detailed /p:Configuration=%CONFIG%
|
2006-09-15 23:42:02 +02:00
|
|
|
if not "%1" == "" vcbuild %1.vcproj %CONFIG%
|
2007-02-27 16:21:48 +01:00
|
|
|
SET E=%ERRORLEVEL%
|
2006-09-15 23:42:02 +02:00
|
|
|
|
|
|
|
cd %STARTDIR%
|
2007-02-27 16:21:48 +01:00
|
|
|
|
2007-06-26 13:43:56 +02:00
|
|
|
REM exit fix for pre-2003 shell especially if used on buildfarm
|
|
|
|
if "%XP_EXIT_FIX%" == "yes" exit %E%
|
2007-02-27 16:21:48 +01:00
|
|
|
exit /b %E%
|