diff options
| -rw-r--r-- | contrib/coccinelle/meson.build | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/coccinelle/meson.build b/contrib/coccinelle/meson.build index 5d76a7fee6..ea054c924f 100644 --- a/contrib/coccinelle/meson.build +++ b/contrib/coccinelle/meson.build @@ -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 |
