Make all msvc build scripts use buildenv.pl, not buildenv.bat.
authorMagnus Hagander <magnus@hagander.net>
Wed, 19 Dec 2007 12:29:36 +0000 (12:29 +0000)
committerMagnus Hagander <magnus@hagander.net>
Wed, 19 Dec 2007 12:29:36 +0000 (12:29 +0000)
Andrew Dunstan

doc/src/sgml/install-win32.sgml
src/tools/msvc/builddoc.bat
src/tools/msvc/install.bat
src/tools/msvc/pgbison.bat
src/tools/msvc/pgflex.bat

index 86c2d71b9381b2b465b3c0fe37ccba9826c62638..feed3df7c895b9d27b6c5e92173adc72a40791e1 100644 (file)
   Before you build, edit the file <filename>config.pl</filename> to reflect the
   configuration options you want set, including the paths to libraries used.
   If you need to set any other environment variables, create a file called
-  <filename>buildenv.bat</filename> and put the required commands there. For
+  <filename>buildenv.pl</filename> and put the required commands there. For
   example, to add the path for bison when it's not in the PATH, create a file
   containing:
   <screen>
-   @ECHO OFF
-   SET PATH=%PATH%;c:\some\where\bison\bin
+   $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
   </screen>
  </para>
 
     </userinput>
    </screen>
    To change the default build configuration to debug, put the following
-   in the <filename>buildenv.bat</filename> file:
+   in the <filename>buildenv.pl</filename> file:
    <screen>
     <userinput>
-     set CONFIG=Debug
+     $ENV{CONFIG}="Debug";
     </userinput>
    </screen>
   </para>
    required parts first. Also, make sure that the DLLs required to load all
    parts of the system (such as the Perl and Python DLLs for the procedural
    languages) are present in the system path. If they are not, set it through
-   the <filename>buildenv.bat</filename> file. To run the tests, run one of
+   the <filename>buildenv.pl</filename> file. To run the tests, run one of
    the following commands from the <filename>src\tools\msvc</filename>
    directory:
    <screen>
      </para></listitem>
     </varlistentry>
    </variablelist>
-   Edit the <filename>buildenv.bat</filename> file, and add a variable for the
+   Edit the <filename>buildenv.pl</filename> file, and add a variable for the
    location of the root directory, for example:
    <screen>
-    @ECHO OFF
-    SET DOCROOT=c:\docbook
+    $ENV{DOCROOT}='c:\docbook';
    </screen>
    To build the documentation, run the command
    <filename>builddoc.bat</filename>. Note that this will actually run the
index 04d490e0aa099208c9e5d72e04ebe6b749874adf..e225a656fd0296b1fd66c6a31c27530544a6e64f 100755 (executable)
@@ -1,5 +1,5 @@
 @echo off
-REM Adjust path for your docbook installation in buildenv.bat
+REM Adjust path for your docbook installation in buildenv.pl
 
 REM $PostgreSQL$
 
@@ -10,7 +10,12 @@ SET DSSSL=docbook-dsssl-1.79
 
 IF EXIST ..\msvc IF EXIST ..\..\..\src cd ..\..\..
 IF NOT EXIST doc\src\sgml\version.sgml goto noversion
-IF EXIST src\tools\msvc\buildenv.bat CALL src\tools\msvc\buildenv.bat
+
+IF NOT EXIST src\tools\msvc\buildenv.pl goto nobuildenv
+perl -e "require 'src/tools/msvc/buildenv.pl'; while(($k,$v) = each %ENV) { print qq[\@SET $k=$v\n]; }" > bldenv.bat
+CALL bldenv.bat
+del bldenv.bat
+:nobuildenv 
 
 IF NOT EXIST %DOCROOT%\%OPENJADE% SET NF=OpenJade
 IF NOT EXIST %DOCROOT%\docbook SET NF=docbook
index 4a7fffa908a79c397e9839d5197615f6cadcee08..15f1560e9dcd9c8328d12b11e5c3fb328693eb01 100644 (file)
@@ -13,7 +13,12 @@ exit /b 1
 :RUN_INSTALL
 
 SETLOCAL
-if exist buildenv.bat call buildenv.bat
+
+IF NOT EXIST buildenv.pl goto nobuildenv
+perl -e "require 'buildenv.pl'; while(($k,$v) = each %ENV) { print qq[\@SET $k=$v\n]; }" > bldenv.bat
+CALL bldenv.bat
+del bldenv.bat
+:nobuildenv 
 
 perl install.pl "%1"
 
index dcd6fd4ec480f4514ac27d16ee1d0818b882ba44..b7ba958a026ece0163adacda95e148792a715d2b 100755 (executable)
@@ -1,7 +1,11 @@
 @echo off
 REM $PostgreSQL$
 
-if exist src\tools\msvc\buildenv.bat call src\tools\msvc\buildenv.bat
+IF NOT EXIST src\tools\msvc\buildenv.pl goto nobuildenv
+perl -e "require 'src/tools/msvc/buildenv.pl'; while(($k,$v) = each %ENV) { print qq[\@SET $k=$v\n]; }" > bldenv.bat
+CALL bldenv.bat
+del bldenv.bat
+:nobuildenv 
 
 SET BV=
 for /F "tokens=4 usebackq" %%f in (`bison -V`) do if "!BV!"=="" SET BV=%%f
index 709f9aaa62b82a43e29b51ffa557453d5206b1a9..fce859a67fb734a7aaae4fab712d6e01f3a02c04 100755 (executable)
@@ -1,7 +1,11 @@
 @echo off
 REM $PostgreSQL$
 
-if exist src\tools\msvc\buildenv.bat call src\tools\msvc\buildenv.bat
+IF NOT EXIST src\tools\msvc\buildenv.pl goto nobuildenv
+perl -e "require 'src/tools/msvc/buildenv.pl'; while(($k,$v) = each %ENV) { print qq[\@SET $k=$v\n]; }" > bldenv.bat
+CALL bldenv.bat
+del bldenv.bat
+:nobuildenv 
 
 flex -V > NUL
 if errorlevel 1 goto noflex