Skip to content

Commit 5a4d746

Browse files
committed
Merge branch 'es/meson-build-skip-coccinelle' into kn/meson-hdr-check
* es/meson-build-skip-coccinelle: meson: disable coccinelle configuration when building from a tarball
2 parents 9d22ac5 + d2827dc commit 5a4d746

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

contrib/coccinelle/meson.build

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
spatch = find_program('spatch', required: get_option('coccinelle'))
1+
coccinelle_opt = get_option('coccinelle').require(
2+
fs.exists(meson.project_source_root() / '.git'),
3+
error_message: 'coccinelle can only be run from a git checkout',
4+
)
5+
6+
spatch = find_program('spatch', required: coccinelle_opt)
27
if not spatch.found()
38
subdir_done()
49
endif

0 commit comments

Comments
 (0)