Re: Meson build updates

From: "Tristan Partin" <tristan(at)neon(dot)tech>
To: "Andres Freund" <andres(at)anarazel(dot)de>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Meson build updates
Date: 2023-06-29 19:07:19
Message-ID: CTPDBT2W78PQ.2QUDVHFNR5MCS@gonk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu Jun 29, 2023 at 2:02 PM CDT, Andres Freund wrote:
> 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.

Yeah, I guess it is a matter if you like the layout being closer to the
installation or the source tree at the expense of repetition. I am
partial to the installation since it is less to type if you run a binary
from the build directory and less repetition, but all good. Maybe
something that could be reconsidered when autotools is dropped.

I still think the overrides are important, at the very least for libpq,
but I will defer to your aforementioned decision for now.

--
Tristan Partin
Neon (https://neon.tech)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2023-06-29 19:08:35 Re: pgsql: Fix search_path to a safe value during maintenance operations.
Previous Message Tristan Partin 2023-06-29 19:03:19 Re: Meson build updates