Re: automatically generating node support functions

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: automatically generating node support functions
Дата
Msg-id 20220711213755.gwcysmuypke3wckg@awork3.anarazel.de
обсуждение исходный текст
Ответ на Re: automatically generating node support functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: automatically generating node support functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

On 2022-07-11 16:38:05 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > On 2022-07-11 15:54:22 -0400, Tom Lane wrote:
> >> We can't simply move the file list into gen_node_support.pl, because
> >> (a) the build system has to know about the dependencies involved
> 
> > Meson has builtin support for tools like gen_node_support.pl reporting which
> > files they've read and then to use those as dependencies. It'd not be a lot of
> > effort to open-code that with make either.
> 
> If you want to provide code for that, sure, but I don't know how to do it.

It'd basically be something like a --deps option providing a path to a file
(e.g. .deps/nodetags.Po) where the script would emit something roughly
equivalent to

path/to/nodetags.h: path/to/nodes/nodes.h
path/to/nodetags.h: path/to/nodes/primnodes.h
...
path/to/readfuncs.c: path/to/nodetags.h

It might or might not make sense to output this as one rule instead of
multiple ones.

I think our existing dependency support would do the rest.


We'd still need a dependency on node-support-stamp (or nodetags.h or ...), to
trigger the first invocation of gen_node_support.pl.


I don't think it's worth worrying about this not working reliably for non
--enable-depend builds, there's a lot more broken than this. But it might be a
bit annoying to deal with either a) creating the .deps directory even without
--enable-depend, or b) specifying --deps only optionally.

I can give it a go if this doesn't sound insane.

Greetings,

Andres Freund



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Re: Avoid erroring out when unable to remove or parse logical rewrite files to save checkpoint work
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Issue with pg_stat_subscription_stats