Subject: Re: [PATCH v2 2/4] meson: move headers definition from 'contrib/coccinelle'

From: Patrick Steinhardt <[email-masked]>
Date: Fri, 11 Apr 2025 12:06:46 +0200

On Thu, Apr 10, 2025 at 01:30:32PM +0200, Karthik Nayak wrote:
> diff --git a/meson.build b/meson.build
> index e98cfa4909..790d178007 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -633,6 +633,28 @@ builtin_sources = [
>    'builtin/write-tree.c',
>  ]
>  
> +third_party_sources = [
> +  ':!contrib',
> +  ':!compat/inet_ntop.c',
> +  ':!compat/inet_pton.c',
> +  ':!compat/nedmalloc',
> +  ':!compat/obstack.*',
> +  ':!compat/poll',
> +  ':!compat/regex',
> +  ':!sha1collisiondetection',
> +  ':!sha1dc',
> +  ':!t/unit-tests/clar',
> +  ':!t/unit-tests/clar',
> +  ':!t/t[0-9][0-9][0-9][0-9]*',
> +]
> +
> +headers = []

I think we should make sure that this variable isn't declared at all
unless `git.found()`. Otherwise, we may accidentally it it even though
it does not contain anything sensible.

Patrick