Re: Meson build updates

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Tristan Partin <tristan@neon.tech>
Cc: pgsql-hackers@postgresql.org
Date: 2023-06-29T19:02:42Z
Lists: pgsql-hackers
Hi,

On 2023-06-13 14:56:36 -0500, Tristan Partin wrote:
> I was thinking today. When you initially wrote the build, did you try
> using the src/bin/meson.build file as the place where all the binaries
> were built? As you say, most of the src/bin/xxx/meson.build files are
> extrememly reptitive.

> We had a similar-ish issue in my last project which I solved like:
> 
> https://github.com/hse-project/hse/blob/master/tools/meson.build#L20-L405
> 
> This is a pattern I used quite frequently in that project. One benefit
> of this approach is that the binaries all end up next to each other in
> the build tree which is eventually how they'll be laid out in the
> install destination. The other benefit is of course reducing reptitive
> code.

I think the build directory and the source code directory not matching in
structure would have made it considerably harder sell for people to migrate.

I.e. I considered it, but due to meson's "no outputs outside of the current
directory" rule, it didn't (and sadly still doesn't) really seem viable.

Greetings,

Andres Freund



Commits

  1. meson: Make detection of python more robust

  2. meson: Pass more feature option through to required kwargs

  3. meson: Tie adding C++ support to the llvm Meson option

  4. meson: Fix intl misspelling

  5. meson: Use a better error message in an impossible case

  6. meson: Make some Meson style more consistent with surrounding code

  7. meson: Fix some grammar usage in Meson comments

  8. meson: Mention the correct way to disable readline support

  9. meson: Remove old comment

  10. meson: Use the not_found_dep constant

  11. meson: Attach colon to keyword argument

  12. meson: Use consistent Meson option description formats

  13. meson: Use consistent casing in Meson option descriptions

  14. meson: Remove triple-quoted strings