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
@@ -55,18 +55,18 @@ concatenated_rules = custom_target(
55
capture: true,
56
)
57
58
-sources = [ ]
58
+coccinelle_sources = []
59
foreach source : run_command(git, '-C', meson.project_source_root(), 'ls-files', '--deduplicate', '*.c', third_party_sources, check: true).stdout().split()
60
- sources += source
60
+ coccinelle_sources += source
61
endforeach
62
63
-headers = [ ]
63
+coccinelle_headers = []
64
foreach header : run_command(git, '-C', meson.project_source_root(), 'ls-files', '--deduplicate', '*.h', third_party_sources, check: true).stdout().split()
65
- headers += meson.project_source_root() / header
65
+ coccinelle_headers += meson.project_source_root() / header
66
endforeach
67
68
patches = [ ]
69
-foreach source : sources
69
+foreach source : coccinelle_sources
70
patches += custom_target(
71
command: [
72
spatch,
@@ -78,7 +78,7 @@ foreach source : sources
78
input: meson.project_source_root() / source,
79
output: source.underscorify() + '.patch',
80
capture: true,
81
- depend_files: headers,
81
+ depend_files: coccinelle_headers,
82
)
83
endforeach
84