pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Rowley <david.rowley@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-committers@postgresql.org
Subject: Re: pgsql: Best-guess attempt at fixing MSVC build for 68ab8e8ba4a471d9.
Date: Mon, 21 Mar 2016 22:38:50 +1300
Message-ID: <CAKJS1f_9CCi_t+LEgV5GWoCj3wjavcMoDc5qfcf_A0UwpQoPoA@mail.gmail.com> (raw)
In-Reply-To: <E1ahlGS-0006ZU-DY@gemulon.postgresql.org>
References: <E1ahlGS-0006ZU-DY@gemulon.postgresql.org>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

On 21 March 2016 at 10:52, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Best-guess attempt at fixing MSVC build for 68ab8e8ba4a471d9.
>
> pgbench now needs to use src/bin/psql/psqlscan.l, but it's not very clear
> how to fit that into the MSVC build system.  If this doesn't work I'm going
> to need some help from somebody who actually understands those scripts ...

I see this didn't fix the problem :-(

Perl is not my native tongue, but after a little study and some
testing on a windows machine, the attached seems to fix the problem.

I've never much looked at these script before, but it seems that the
parsing of the Makefile just assumes that psqlscan.c is in the same
path as the rest of the stuff. The patch just uses some already
defined file replace functions to switch the wrong filename out for
the correct one before the Visual Studios project file is created.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

Attachments:

msvc_psqlscan_fix.diff (text/plain, 842B) download diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm index 3d929e6..ab65fa3 100644 --- a/src/tools/msvc/Mkvcbuild.pm +++ b/src/tools/msvc/Mkvcbuild.pm @@ -71,7 +71,7 @@ my $frontend_extrasource = { 'src/bin/psql/psqlscan.l' ] }; my @frontend_excludes = ( 'pgevent', 'pg_basebackup', 'pg_rewind', 'pg_dump', - 'pg_xlogdump', 'scripts'); + 'pg_xlogdump', 'scripts', 'pgbench'); sub mkvcbuild { @@ -674,6 +674,11 @@ sub mkvcbuild } $pg_xlogdump->AddFile('src/backend/access/transam/xlogreader.c'); + # fix up pgbench once it's been set up + # we're borrowing psqlscan.c from psql, so grab it from the correct place + my $pgbench = AddSimpleFrontend('pgbench'); + $pgbench->ReplaceFile('src/bin/pgbench/psqlscan.c', 'src/bin/psql/psqlscan.c'); + $solution->Save(); return $solution->{vcver}; }

view thread (8+ messages)  latest in thread

Message-ID: <CAKJS1f_9CCi_t+LEgV5GWoCj3wjavcMoDc5qfcf_A0UwpQoPoA@mail.gmail.com>
Permalink:  ../CAKJS1f_9CCi_t+LEgV5GWoCj3wjavcMoDc5qfcf_A0UwpQoPoA@mail.gmail.com/
Also on:    postgresql.org/message-id/CAKJS1f_9CCi_t+LEgV5GWoCj3wjavcMoDc5qfcf_A0UwpQoPoA@mail.gmail.com

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: david.rowley@2ndquadrant.com, tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Best-guess attempt at fixing MSVC build for 68ab8e8ba4a471d9.
  In-Reply-To: <CAKJS1f_9CCi_t+LEgV5GWoCj3wjavcMoDc5qfcf_A0UwpQoPoA@mail.gmail.com>
  References: <E1ahlGS-0006ZU-DY@gemulon.postgresql.org> <CAKJS1f_9CCi_t+LEgV5GWoCj3wjavcMoDc5qfcf_A0UwpQoPoA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox