]> git.ipfire.org Git - thirdparty/git.git/commit
meson: add support for 'hdr-check'
authorKarthik Nayak <karthik.188@gmail.com>
Wed, 23 Apr 2025 08:15:38 +0000 (10:15 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Apr 2025 17:36:18 +0000 (10:36 -0700)
commit02a132616ac69cd546c823c47afd60eab738792c
tree6579f5d79dfe7087f7109a8a4add119580eac2fa
parent7e873eb390204dbe55ec4101fb7ab737f5ae0bc6
meson: add support for 'hdr-check'

The Makefile supports a target called 'hdr-check', which checks if
individual header files can be independently compiled. Let's port this
functionality to Meson, our new build system too. The implementation
resembles that of the Makefile and provides the same check.

Since meson builds are out-of-tree, header dependencies are not
automatically met. So unlike the Makefile version, we also need to add
the required dependencies.

Also add the 'xdiff/' dir to the list of 'third_party_sources' as those
headers must be skipped from the checks too. This also skips the folder
from the 'coccinelle' checks, this is okay, since this code is an
external dependency.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
meson.build