coccinelle: meson: rename variables to be more specific
In Meson, included subdirs export their variables to top level Meson builds. In 'contrib/coccinelle/meson.build', we define two such variables `sources` and `headers`. While these variables are specific to the checks in the 'contrib/coccinelle/' directory, they also pollute the top level 'meson.build'. Rename them to be more specific, this ensures that they aren't mistakenly used in the upper levels and avoid variable name collisions. While here, change the empty list denotation to be consistent with other places. Signed-off-by: Karthik Nayak <karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Karthik Nayak committed
Apr 23, 2025 at 10:15 UTC
8e980b7f2501c4b9429394f7287757af7aef81ba
1 file changed
+6
-6
contrib/coccinelle/meson.build
+6
-6
index ea054c924f..03ce52d752 100644
--- a/contrib/coccinelle/meson.build
+++ b/contrib/coccinelle/meson.build
@@ -55,18 +55,18 @@ concatenated_rules = custom_target(
capture: true,
)
-sources = [ ]
+coccinelle_sources = []
foreach source : run_command(git, '-C', meson.project_source_root(), 'ls-files', '--deduplicate', '*.c', third_party_sources, check: true).stdout().split()
- sources += source
+ coccinelle_sources += source
endforeach
-headers = [ ]
+coccinelle_headers = []
foreach header : run_command(git, '-C', meson.project_source_root(), 'ls-files', '--deduplicate', '*.h', third_party_sources, check: true).stdout().split()
- headers += meson.project_source_root() / header
+ coccinelle_headers += meson.project_source_root() / header
endforeach
patches = [ ]
-foreach source : sources
+foreach source : coccinelle_sources
patches += custom_target(
command: [
spatch,
@@ -78,7 +78,7 @@ foreach source : sources
input: meson.project_source_root() / source,
output: source.underscorify() + '.patch',
capture: true,
- depend_files: headers,
+ depend_files: coccinelle_headers,
)
endforeach