Skip to content

Commit 0a6ac00

Browse files
committed
Make all msvc build scripts use buildenv.pl, not buildenv.bat.
Andrew Dunstan
1 parent 3f2b1db commit 0a6ac00

File tree

5 files changed

+35
-19
lines changed

5 files changed

+35
-19
lines changed

doc/src/sgml/install-win32.sgml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/install-win32.sgml,v 1.43 2007/12/02 22:33:20 tgl Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/install-win32.sgml,v 1.44 2007/12/19 12:29:36 mha Exp $ -->
22

33
<chapter id="install-win32">
44
<title>Installation on <productname>Windows</productname></title>
@@ -58,12 +58,11 @@
5858
Before you build, edit the file <filename>config.pl</filename> to reflect the
5959
configuration options you want set, including the paths to libraries used.
6060
If you need to set any other environment variables, create a file called
61-
<filename>buildenv.bat</filename> and put the required commands there. For
61+
<filename>buildenv.pl</filename> and put the required commands there. For
6262
example, to add the path for bison when it's not in the PATH, create a file
6363
containing:
6464
<screen>
65-
@ECHO OFF
66-
SET PATH=%PATH%;c:\some\where\bison\bin
65+
$ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
6766
</screen>
6867
</para>
6968

@@ -209,10 +208,10 @@
209208
</userinput>
210209
</screen>
211210
To change the default build configuration to debug, put the following
212-
in the <filename>buildenv.bat</filename> file:
211+
in the <filename>buildenv.pl</filename> file:
213212
<screen>
214213
<userinput>
215-
set CONFIG=Debug
214+
$ENV{CONFIG}="Debug";
216215
</userinput>
217216
</screen>
218217
</para>
@@ -263,7 +262,7 @@
263262
required parts first. Also, make sure that the DLLs required to load all
264263
parts of the system (such as the Perl and Python DLLs for the procedural
265264
languages) are present in the system path. If they are not, set it through
266-
the <filename>buildenv.bat</filename> file. To run the tests, run one of
265+
the <filename>buildenv.pl</filename> file. To run the tests, run one of
267266
the following commands from the <filename>src\tools\msvc</filename>
268267
directory:
269268
<screen>
@@ -339,11 +338,10 @@
339338
</para></listitem>
340339
</varlistentry>
341340
</variablelist>
342-
Edit the <filename>buildenv.bat</filename> file, and add a variable for the
341+
Edit the <filename>buildenv.pl</filename> file, and add a variable for the
343342
location of the root directory, for example:
344343
<screen>
345-
@ECHO OFF
346-
SET DOCROOT=c:\docbook
344+
$ENV{DOCROOT}='c:\docbook';
347345
</screen>
348346
To build the documentation, run the command
349347
<filename>builddoc.bat</filename>. Note that this will actually run the

src/tools/msvc/builddoc.bat

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@echo off
2-
REM Adjust path for your docbook installation in buildenv.bat
2+
REM Adjust path for your docbook installation in buildenv.pl
33

4-
REM $PostgreSQL: pgsql/src/tools/msvc/builddoc.bat,v 1.5 2007/03/17 14:01:01 mha Exp $
4+
REM $PostgreSQL: pgsql/src/tools/msvc/builddoc.bat,v 1.6 2007/12/19 12:29:36 mha Exp $
55

66
SETLOCAL
77
SET STARTDIR=%CD%
@@ -10,7 +10,12 @@ SET DSSSL=docbook-dsssl-1.79
1010

1111
IF EXIST ..\msvc IF EXIST ..\..\..\src cd ..\..\..
1212
IF NOT EXIST doc\src\sgml\version.sgml goto noversion
13-
IF EXIST src\tools\msvc\buildenv.bat CALL src\tools\msvc\buildenv.bat
13+
14+
IF NOT EXIST src\tools\msvc\buildenv.pl goto nobuildenv
15+
perl -e "require 'src/tools/msvc/buildenv.pl'; while(($k,$v) = each %ENV) { print qq[\@SET $k=$v\n]; }" > bldenv.bat
16+
CALL bldenv.bat
17+
del bldenv.bat
18+
:nobuildenv
1419

1520
IF NOT EXIST %DOCROOT%\%OPENJADE% SET NF=OpenJade
1621
IF NOT EXIST %DOCROOT%\docbook SET NF=docbook

src/tools/msvc/install.bat

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@echo off
2-
REM $PostgreSQL: pgsql/src/tools/msvc/install.bat,v 1.2 2007/06/26 11:43:56 mha Exp $
2+
REM $PostgreSQL: pgsql/src/tools/msvc/install.bat,v 1.3 2007/12/19 12:29:36 mha Exp $
33

44
if NOT "%1"=="" GOTO RUN_INSTALL
55

@@ -13,7 +13,12 @@ exit /b 1
1313
:RUN_INSTALL
1414

1515
SETLOCAL
16-
if exist buildenv.bat call buildenv.bat
16+
17+
IF NOT EXIST buildenv.pl goto nobuildenv
18+
perl -e "require 'buildenv.pl'; while(($k,$v) = each %ENV) { print qq[\@SET $k=$v\n]; }" > bldenv.bat
19+
CALL bldenv.bat
20+
del bldenv.bat
21+
:nobuildenv
1722

1823
perl install.pl "%1"
1924

src/tools/msvc/pgbison.bat

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
@echo off
2-
REM $PostgreSQL: pgsql/src/tools/msvc/pgbison.bat,v 1.7 2007/07/07 07:43:21 mha Exp $
2+
REM $PostgreSQL: pgsql/src/tools/msvc/pgbison.bat,v 1.8 2007/12/19 12:29:36 mha Exp $
33

4-
if exist src\tools\msvc\buildenv.bat call src\tools\msvc\buildenv.bat
4+
IF NOT EXIST src\tools\msvc\buildenv.pl goto nobuildenv
5+
perl -e "require 'src/tools/msvc/buildenv.pl'; while(($k,$v) = each %ENV) { print qq[\@SET $k=$v\n]; }" > bldenv.bat
6+
CALL bldenv.bat
7+
del bldenv.bat
8+
:nobuildenv
59

610
SET BV=
711
for /F "tokens=4 usebackq" %%f in (`bison -V`) do if "!BV!"=="" SET BV=%%f

src/tools/msvc/pgflex.bat

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
@echo off
2-
REM $PostgreSQL: pgsql/src/tools/msvc/pgflex.bat,v 1.4 2007/03/17 14:01:01 mha Exp $
2+
REM $PostgreSQL: pgsql/src/tools/msvc/pgflex.bat,v 1.5 2007/12/19 12:29:36 mha Exp $
33

4-
if exist src\tools\msvc\buildenv.bat call src\tools\msvc\buildenv.bat
4+
IF NOT EXIST src\tools\msvc\buildenv.pl goto nobuildenv
5+
perl -e "require 'src/tools/msvc/buildenv.pl'; while(($k,$v) = each %ENV) { print qq[\@SET $k=$v\n]; }" > bldenv.bat
6+
CALL bldenv.bat
7+
del bldenv.bat
8+
:nobuildenv
59

610
flex -V > NUL
711
if errorlevel 1 goto noflex

0 commit comments

Comments
 (0)