Re: [PATCH] Add `headerscheck` run_target to meson

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Bilal Yavuz <byavuz81(at)gmail(dot)com>, Miłosz Bieniek <bieniek(dot)milosz0(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Add `headerscheck` run_target to meson
Date: 2026-03-18 11:59:51
Message-ID: 8ade4a93-26d2-4995-94c9-ee3f8f794a24@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 18.03.26 11:56, Peter Eisentraut wrote:
> On 04.12.25 08:09, Bilal Yavuz wrote:
>> 0001 adds python_includespec and perl_includespec variables to the
>> Makefile.global of the meson build.
>
> Committed that, with some light cosmetic ordering changes.
>
>> 0002 adds headerscheck target to meson build like you do but with 2
>> extra changes. First one is that, I moved the headerscheck script to a
>> variable and used it in the target commands. Second one is that,
>> headerscheck script could not find the perl_includespec and
>> python_includespec variables because of the tabs in the sed command, I
>> changed them with '[:space:]' and it worked. I am not sure if that is
>> the correct fix but I just wanted to see if the script will work.
>
> Committed that, but without the regular expression changes.  I don't
> understand why those would be needed.  Please provide more information
> if necessary.  It worked for me without it.

I need another tweak for the cpluspluscheck.

In meson, the distribution of the include flags between CPPFLAGS,
CFLAGS, and CXXFLAGS ends up being a bit different, and we need to get a
few -I options from CXXFLAGS in my case.

I have attached two different variants for how to do this. The first
one just gets the -D and -I flags from CXXFLAGS. This preserves most of
the existing behavior. The second aligns more with how CFLAGS works and
removes the ability to override CXXFLAGS from the command line. This is
probably now better since we have more support for getting correct CXX
and CXXFLAGS in the build system. But it might be a change for some users.

Thoughts?

Attachment Content-Type Size
0001-headerscheck-Get-CXXFLAGS-variant-1.patch text/plain 1.3 KB
0001-headerscheck-Get-CXXFLAGS-variant-2.patch text/plain 1.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Pyhalov 2026-03-18 12:08:49 Re: Function scan FDW pushdown
Previous Message Zsolt Parragi 2026-03-18 11:59:35 Bug? pg_rewind produces unusable but starting database with standby recovery