Skip to content

Commit 8e980b7

Browse files
KarthikNayakgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a064b0b commit 8e980b7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

contrib/coccinelle/meson.build

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,18 @@ concatenated_rules = custom_target(
5555
capture: true,
5656
)
5757

58-
sources = [ ]
58+
coccinelle_sources = []
5959
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
6161
endforeach
6262

63-
headers = [ ]
63+
coccinelle_headers = []
6464
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
6666
endforeach
6767

6868
patches = [ ]
69-
foreach source : sources
69+
foreach source : coccinelle_sources
7070
patches += custom_target(
7171
command: [
7272
spatch,
@@ -78,7 +78,7 @@ foreach source : sources
7878
input: meson.project_source_root() / source,
7979
output: source.underscorify() + '.patch',
8080
capture: true,
81-
depend_files: headers,
81+
depend_files: coccinelle_headers,
8282
)
8383
endforeach
8484

0 commit comments

Comments
 (0)