vcbuild updates - Mailing list pgsql-patches

From Magnus Hagander
Subject vcbuild updates
Date
Msg-id 45ABF130.8080404@hagander.net
Whole thread Raw
Responses Re: vcbuild updates
Re: vcbuild updates
Re: vcbuild updates
List pgsql-patches
* After Markos patch, now builds pgcrypto without zlib again
* Updates README with xml info
* xml requires xslt and iconv
* disable unnecessary warning about __cdecl()
* Add a buildenv.bat called from all other bat files to set up things
like PATH for flex/bison. (Can't just set it before calling, doesn't
always work when building from the GUI)

//Magnus

Index: Project.pm
===================================================================
RCS file: c:/prog/cvsrepo/pgsql/pgsql/src/tools/msvc/Project.pm,v
retrieving revision 1.5
diff -c -r1.5 Project.pm
*** Project.pm    4 Jan 2007 17:58:19 -0000    1.5
--- Project.pm    15 Jan 2007 21:07:48 -0000
***************
*** 23,29 ****
          includes        => '',
          defines         => ';',
          solution        => $solution,
!         disablewarnings => '4018;4244',
      };

      bless $self;
--- 23,29 ----
          includes        => '',
          defines         => ';',
          solution        => $solution,
!         disablewarnings => '4018;4244;4273',
      };

      bless $self;
Index: README
===================================================================
RCS file: c:/prog/cvsrepo/pgsql/pgsql/src/tools/msvc/README,v
retrieving revision 1.1
diff -c -r1.1 README
*** README    9 Jan 2007 05:56:49 -0000    1.1
--- README    15 Jan 2007 21:05:52 -0000
***************
*** 9,14 ****
--- 9,19 ----

  First, edit config.pl to reflect what "configure options" you want set.

+ If you need to modify the environment for calling external tools, such as
+ flex or bison, create a file called "buildenv.bat". This file will be called
+ by all scripts before anything is done, so the environment can be set up.
+ (for example, include SET PATH=%PATH%;c:\some\where\bison\bin)
+
  Then, to build all of PostgreSQL in debug configuration, run the command
      build
  from a Visual Studio Command Prompt (to get all environment
***************
*** 54,56 ****
--- 59,65 ----

  zlib - required for compression support in pg_dump/pg_restore
  Get from http://www.zlib.net
+
+ libxml2 and libxslt - required for XML support
+ Get from http://www.zlatkovic.com/pub/libxml or build from source from
+ http://xmlsoft.org. Note that libxml2 requires iconv.
Index: Solution.pm
===================================================================
RCS file: c:/prog/cvsrepo/pgsql/pgsql/src/tools/msvc/Solution.pm,v
retrieving revision 1.5
diff -c -r1.5 Solution.pm
*** Solution.pm    29 Dec 2006 16:49:02 -0000    1.5
--- Solution.pm    15 Jan 2007 21:05:32 -0000
***************
*** 14,19 ****
--- 13,23 ----
          strver   => '',
      };
      bless $self;
+     if ($options->{xml}) {
+       if (!($options->{xslt} && $options->{iconv})) {
+          die "XML requires both XSLT and ICONV\n";
+       }
+    }
      return $self;
  }

Index: build.bat
===================================================================
RCS file: c:/prog/cvsrepo/pgsql/pgsql/src/tools/msvc/build.bat,v
retrieving revision 1.3
diff -c -r1.3 build.bat
*** build.bat    10 Jan 2007 03:54:35 -0000    1.3
--- build.bat    15 Jan 2007 21:09:17 -0000
***************
*** 1,5 ****
--- 1,7 ----
  @echo off
  SET STARTDIR=%CD%
+ if exist src\tools\msvc\buildenv.bat call src\tools\msvc\buildenv.bat
+ if exist buildenv.bat call buildenv.bat

  perl mkvcbuild.pl
  if errorlevel 1 goto :eof
Index: mkvcbuild.pl
===================================================================
RCS file: c:/prog/cvsrepo/pgsql/pgsql/src/tools/msvc/mkvcbuild.pl,v
retrieving revision 1.9
diff -c -r1.9 mkvcbuild.pl
*** mkvcbuild.pl    9 Jan 2007 06:00:43 -0000    1.9
--- mkvcbuild.pl    15 Jan 2007 21:16:06 -0000
***************
*** 187,210 ****
  }

  # Pgcrypto makefile too complex to parse....
! # Pgcrypto requires zlib
! if ($solution->{options}->{zlib}) {
!    my $pgcrypto = $solution->AddProject('pgcrypto','dll','crypto');
!    $pgcrypto->AddFiles('contrib\pgcrypto','pgcrypto.c','px.c','px-hmac.c','px-crypt.c',
!            'crypt-gensalt.c','crypt-blowfish.c','crypt-des.c','crypt-md5.c','mbuf.c',
!            'pgp.c','pgp-armor.c','pgp-cfb.c','pgp-compress.c','pgp-decrypt.c','pgp-encrypt.c',
!            'pgp-info.c','pgp-mpi.c','pgp-pubdec.c','pgp-pubenc.c','pgp-pubkey.c','pgp-s2k.c',
!            'pgp-pgsql.c');
!    if ($solution->{options}->{openssl}) {
!        $pgcrypto->AddFiles('contrib\pgcrypto', 'openssl.c','pgp-mpi-openssl.c');
!    }
!    else {
!        $pgcrypto->AddFiles('contrib\pgcrypto', 'md5.c','sha1.c','sha2.c','internal.c','internal-sha2.c',
!                'blf.c','rijndael.c','fortuna.c','random.c','pgp-mpi-internal.c','imath.c');
!    }
!    $pgcrypto->AddReference($postgres);
!    $pgcrypto->AddLibrary('wsock32.lib');
  }

  my $D;
  opendir($D, 'contrib') || croak "Could not opendir on contrib!\n";
--- 192,212 ----
  }

  # Pgcrypto makefile too complex to parse....
! my $pgcrypto = $solution->AddProject('pgcrypto','dll','crypto');
! $pgcrypto->AddFiles('contrib\pgcrypto','pgcrypto.c','px.c','px-hmac.c','px-crypt.c',
!         'crypt-gensalt.c','crypt-blowfish.c','crypt-des.c','crypt-md5.c','mbuf.c',
!         'pgp.c','pgp-armor.c','pgp-cfb.c','pgp-compress.c','pgp-decrypt.c','pgp-encrypt.c',
!         'pgp-info.c','pgp-mpi.c','pgp-pubdec.c','pgp-pubenc.c','pgp-pubkey.c','pgp-s2k.c',
!         'pgp-pgsql.c');
! if ($solution->{options}->{openssl}) {
!     $pgcrypto->AddFiles('contrib\pgcrypto', 'openssl.c','pgp-mpi-openssl.c');
  }
+ else {
+     $pgcrypto->AddFiles('contrib\pgcrypto', 'md5.c','sha1.c','sha2.c','internal.c','internal-sha2.c',
+             'blf.c','rijndael.c','fortuna.c','random.c','pgp-mpi-internal.c','imath.c');
+ }
+ $pgcrypto->AddReference($postgres);
+ $pgcrypto->AddLibrary('wsock32.lib');

  my $D;
  opendir($D, 'contrib') || croak "Could not opendir on contrib!\n";
Index: pgbison.bat
===================================================================
RCS file: c:/prog/cvsrepo/pgsql/pgsql/src/tools/msvc/pgbison.bat,v
retrieving revision 1.2
diff -c -r1.2 pgbison.bat
*** pgbison.bat    22 Oct 2006 17:17:08 -0000    1.2
--- pgbison.bat    15 Jan 2007 20:56:20 -0000
***************
*** 1,4 ****
--- 1,6 ----
  @echo off
+ if exist src\tools\msvc\buildenv.bat call src\tools\msvc\buildenv.bat
+
  SET BV=
  for /F "tokens=4 usebackq" %%f in (`bison -V`) do if "!BV!"=="" SET BV=%%f
  if "%BV%"=="" goto novarexp
Index: pgflex.bat
===================================================================
RCS file: c:/prog/cvsrepo/pgsql/pgsql/src/tools/msvc/pgflex.bat,v
retrieving revision 1.2
diff -c -r1.2 pgflex.bat
*** pgflex.bat    22 Oct 2006 17:17:09 -0000    1.2
--- pgflex.bat    15 Jan 2007 20:56:25 -0000
***************
*** 1,4 ****
--- 1,6 ----
  @echo off
+ if exist src\tools\msvc\buildenv.bat call src\tools\msvc\buildenv.bat
+
  flex -V > NUL
  if errorlevel 1 goto noflex


pgsql-patches by date:

Previous
From: Dave Page
Date:
Subject: Re: pg_dumpall default database
Next
From: Alvaro Herrera
Date:
Subject: Re: vcbuild updates