Re: Meson build updates

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tristan Partin <tristan(at)neon(dot)tech>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Meson build updates
Date: 2023-06-29 19:02:42
Message-ID: 20230629190242.kgnimiizjbvmdfni@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tristan Partin 2023-06-29 19:03:19 Re: Meson build updates
Previous Message Andres Freund 2023-06-29 18:58:45 Re: Meson build updates