Re: moving from contrib to bin
От | Michael Paquier |
---|---|
Тема | Re: moving from contrib to bin |
Дата | |
Msg-id | CAB7nPqQqzUckKPxfMGG_PLksar0FFs0dQh_B4MEFGjQXD5Dvtg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: moving from contrib to bin (Alvaro Herrera <alvherre@2ndquadrant.com>) |
Ответы |
Re: moving from contrib to bin
|
Список | pgsql-hackers |
On Thu, Dec 18, 2014 at 4:02 AM, Alvaro Herrera <alvherre@2ndquadrant.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
В списке pgsql-hackers по дате отправления: