From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: moving from contrib to bin |
Date: | 2014-12-18 01:37:37 |
Message-ID: | CAB7nPqQqzUckKPxfMGG_PLksar0FFs0dQh_B4MEFGjQXD5Dvtg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Dec 18, 2014 at 4:02 AM, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com> wrote:
>
> I know this is how it currently works, but it looks way too messy to me:
>
> + my $pgarchivecleanup = AddSimpleFrontend('pg_archivecleanup');
> + my $pgstandby = AddSimpleFrontend('pg_standby');
> + my $pgtestfsync = AddSimpleFrontend('pg_test_fsync');
> + my $pgtesttiming = AddSimpleFrontend('pg_test_timing');
> + my $pgbench = AddSimpleFrontend('pgbench', 1);
>
> ISTM we should be something like
>
> for each $elem in src/bin/Makefile:$(SUBDIRS)
> AddSimpleFrontend($elem)
>
> and avoid having to list the modules one by one.
If we take this road, I'd like to avoid a huge if/elseif scanning the
names of the submodules to do the necessary adjustments (Some need
FRONTEND defined, others ws2_32, etc.). Also, there is the case of
pg_basebackup where multiple binaries are included with pg_basebackup,
pg_recvlogical and pg_receivexlog. So I think that we'd need something
similar to what contrib does, aka:
my @frontend_excludes = ('pg_basebackup', 'pg_dump', 'pg_dumpall',
'pg_xlogdump', 'initdb' ...);
my frontend_extralibs = ('pgbench' => 'ws2_32.lib');
my @frontend_uselibpq = ('pgbench', 'pg_ctl', 'pg_upgrade');
And for each frontend name excluded we have an individual project
declaration with its own exceptions. With this way of doing when a new
frontend is added by default in src/bin it will be automatically
compiled. How does that sound?
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2014-12-18 01:47:43 | Re: Compiling C++ extensions on MSVC using scripts in src/tools |
Previous Message | Peter Geoghegan | 2014-12-17 23:02:19 | Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} |