Merge branch 'es/meson-build-skip-coccinelle' into jch

Build fix.

* es/meson-build-skip-coccinelle:
  meson: disable coccinelle configuration when building from a tarball
Junio C Hamano 2025-03-29 16:39:28 +09:00
commit 9d1b8a4277
1 changed files with 6 additions and 1 deletions
contrib/coccinelle

View File

@ -1,4 +1,9 @@
spatch = find_program('spatch', required: get_option('coccinelle'))
coccinelle_opt = get_option('coccinelle').require(
fs.exists(meson.project_source_root() / '.git'),
error_message: 'coccinelle can only be run from a git checkout',
)
spatch = find_program('spatch', required: coccinelle_opt)
if not spatch.found()
subdir_done()
endif