Re: [RFC] building postgres with meson

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [RFC] building postgres with meson
Date: 2022-05-26 02:41:59
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


On 2022-05-25 21:38:33 -0400, Tom Lane wrote:
> Andres Freund <andres(at)anarazel(dot)de> writes:
> > in the meson unconference session you'd spotted flex flags for psqlscanslash.l
> > (I think) being "hardcoded". As far as I can tell that's largely just copied
> > from the Makefile):
> > src/backend/parser/Makefile:scan.c: FLEXFLAGS = -CF -p -p
> > src/backend/utils/adt/Makefile:jsonpath_scan.c: FLEXFLAGS = -CF -p -p
> > src/bin/psql/Makefile:psqlscanslash.c: FLEXFLAGS = -Cfe -p -p
> > src/fe_utils/Makefile:psqlscan.c: FLEXFLAGS = -Cfe -p -p
> Hmm, OK. There *is* a FLEXFLAGS definition supplied by configure, and
> I believe many of our scanners do use it, but evidently we're just
> overriding it for the ones where we really care about using specific
> flags. It also looks like the configure-supplied version is usually
> empty, so the fact that this variable exists may be mostly a holdover
> from Autoconf practice rather than something we ever cared about.

Yea, it looks like that.

ISTM that it'd still be good to have something like FLEXFLAGS. But it doesn't
look great, nor really intentional, that FLEXFLAGS is overwritten rather than

> I think the main thing I didn't like about the way you have it in the
> meson file is the loss of greppability. I could investigate this
> question in a few seconds just now, but if we drop the use of
> FLEXFLAGS as a macro it'll become much harder to figure out which
> places use what.

I disliked a bunch of repetitiveness as I had it, so I'm polishing that part
just now.

What would you want to grep for? Places that specify additional flags? Or just
places using flex?


Andres Freund

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-05-26 02:58:39 Re: [RFC] building postgres with meson
Previous Message Zhihong Yu 2022-05-26 02:40:58 Re: adding status for COPY progress report