From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-odbc@postgresql.org>
Subject: Re: Adding flag LDFLAGS for compilation of regression tests
Date: Mon, 17 Mar 2014 10:32:05 +0200
Message-ID: <5326B305.40300@vmware.com> (raw)
In-Reply-To: <CAB7nPqR+ourYGFbXtmKtmuhxHtyo28S5P-w3w-RXvj25Fp6j6Q@mail.gmail.com>
References: <CAB7nPqQ-D2JLdq47-LLG2=AaSZ1LMH5zOpbVAMzBqU6Scp0Krw@mail.gmail.com>
<5322E1C6.4080908@vmware.com>
<CAB7nPqR+ourYGFbXtmKtmuhxHtyo28S5P-w3w-RXvj25Fp6j6Q@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>
On 03/17/2014 07:49 AM, Michael Paquier wrote:
> On Fri, Mar 14, 2014 at 8:02 PM, Heikki Linnakangas
> <hlinnakangas@vmware.com> wrote:
>> Hmm. The regression test Makefile really ought to pick up the same settings
>> we use for the main makefile, so that if you do "./configure
>> --with-unixodbc=...", the regression tests are automatically built against
>> the same library.
>>
>> I'm not sure what's the best way to achieve that. The regression Makefile is
>> currently completely separate from the automake system. We could add
>> "SUBDIRS=test" into Makefile.am, and then you could do "make installcheck"
>> from the top directory to run the regressions, and you could use the LDFLAGS
>> and other variables set by automake.
>>
>> A problem with that is that the regression suite Makefile depends on
>> PostgreSQL's pg_config to find the pg_regress program. I guess the proper
>> solution would be to add an optional configure flag to provide a path to
>> pg_config. If pg_config is not found, then you couldn't run the regression
>> tests, but you could still build the driver without the PostgreSQL header
>> files etc.
>
> Even with that, don't we need first to move the automake process
> currently done on ./Makefile.am to another file? Like let's say
> Makefile.global.am, which contains all the variables set by automake.
> Then we create a new file ./Makefile at the root folder that includes
> Makefile.global. Something similar should be done with test/Makefile
> (inclusion of ./Makefile.global) and it would be able to use the
> values of CFLAGS, CDFLAGS and even PG_CONFIG that configure has set.
Hmm, yes, something like that would be good. We can't easily restructure
the main Makefile like that, though, because it's generated by automake.
But we can still create a new Makefile.global file, with the same
CFLAGS/LDFLAGS that the generated Makefile contains.
Actually, we could just move test/Makefile to test/Makefile.in, and let
configure set the LDFLAGS/CFLAGS variables directly in test/Makefile.
I pushed a patch to do that. It doesn't do anything automatic about
PG_CONFIG; it would still be nice to add a configure flag for that.
PS. Have you set up a Windows build environment? I don't think anyone's
put any effort in running the regression tests on Windows yet. If we
could make that work somehow, that would be nice.
- Heikki
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
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-odbc@postgresql.org
Cc: hlinnakangas@vmware.com, michael.paquier@gmail.com
Subject: Re: Adding flag LDFLAGS for compilation of regression tests
In-Reply-To: <5326B305.40300@vmware.com>
References: <CAB7nPqQ-D2JLdq47-LLG2=AaSZ1LMH5zOpbVAMzBqU6Scp0Krw@mail.gmail.com> <5322E1C6.4080908@vmware.com> <CAB7nPqR+ourYGFbXtmKtmuhxHtyo28S5P-w3w-RXvj25Fp6j6Q@mail.gmail.com> <5326B305.40300@vmware.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