Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 62d2525

Browse files
committed
Change default build to release, to be consistent with unix build.
Make it possible to set the default from builenv.bat. Per request from Dave Page
1 parent 5574c9f commit 62d2525

File tree

2 files changed

+28
-12
lines changed

2 files changed

+28
-12
lines changed

doc/src/sgml/install-win32.sgml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/install-win32.sgml,v 1.38 2007/03/29 15:30:52 mha Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/install-win32.sgml,v 1.39 2007/04/18 10:14:06 mha Exp $ -->
22

33
<chapter id="install-win32">
44
<title>Installation on <productname>Windows</productname></title>
@@ -186,17 +186,17 @@
186186
<title>Building</title>
187187

188188
<para>
189-
To build all of PostgreSQL in debug configuration (the default), run the
189+
To build all of PostgreSQL in release configuration (the default), run the
190190
command:
191191
<screen>
192192
<userinput>
193193
build
194194
</userinput>
195195
</screen>
196-
To build all of PostgreSQL in release configuration, run the command:
196+
To build all of PostgreSQL in debug configuration, run the command:
197197
<screen>
198198
<userinput>
199-
build RELEASE
199+
build DEBUG
200200
</userinput>
201201
</screen>
202202
To build just a single project, for example psql, run the commands:
@@ -205,7 +205,14 @@
205205
build psql
206206
</userinput>
207207
<userinput>
208-
build RELEASE psql
208+
build DEBUG psql
209+
</userinput>
210+
</screen>
211+
To change the default build configuration to debug, put the following
212+
in the buildenv.bat file:
213+
<screen>
214+
<userinput>
215+
set CONFIG=Debug
209216
</userinput>
210217
</screen>
211218
</para>

src/tools/msvc/build.bat

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,30 @@
11
@echo off
2-
REM $PostgreSQL: pgsql/src/tools/msvc/build.bat,v 1.7 2007/03/17 14:01:01 mha Exp $
2+
REM $PostgreSQL: pgsql/src/tools/msvc/build.bat,v 1.8 2007/04/18 10:14:06 mha Exp $
33

44
SETLOCAL
55
SET STARTDIR=%CD%
6+
SET CONFIG=
67
if exist src\tools\msvc\buildenv.bat call src\tools\msvc\buildenv.bat
78
if exist buildenv.bat call buildenv.bat
89

910
perl mkvcbuild.pl
1011
if errorlevel 1 goto :eof
1112

1213
if exist ..\msvc if exist ..\..\..\src cd ..\..\..
13-
SET CONFIG=
14-
if "%1" == "" set CONFIG=Debug
15-
if "%CONFIG%" == "" if "%1" == "DEBUG" set CONFIG=Debug
16-
if "%CONFIG%" == "" if "%1" == "RELEASE" set CONFIG=Release
17-
if not "%CONFIG%" == "" shift
18-
if "%CONFIG%" == "" set CONFIG=Debug
14+
set CFG=
15+
if "%1" == "DEBUG" (
16+
set CONFIG=Debug
17+
set CFG=1
18+
)
19+
if "%1" == "RELEASE" (
20+
set CONFIG=Release
21+
set CFG=1
22+
)
23+
if "%CONFIG%" == "" set CONFIG=Release
24+
25+
if "%CFG%" == "1" shift
26+
27+
echo Building %CONFIG%
1928

2029
if "%1" == "" msbuild pgsql.sln /verbosity:detailed /p:Configuration=%CONFIG%
2130
if not "%1" == "" vcbuild %1.vcproj %CONFIG%

0 commit comments

Comments
 (0)