Skip to content

Commit fe3efe0

Browse files
committed
Fix merge file using an array. Closes mesonbuild#4424.
1 parent a52cd31 commit fe3efe0

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

mesonbuild/modules/i18n.py

+4
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ def merge_file(self, state, args, kwargs):
8585
if hasattr(inputfile, 'held_object'):
8686
ct = build.CustomTarget(kwargs['output'] + '_merge', state.subdir, state.subproject, kwargs)
8787
else:
88+
if isinstance(inputfile, list):
89+
# We only use this input file to create a name of the custom target.
90+
# Thus we can ignore the other entries.
91+
inputfile = inputfile[0]
8892
if isinstance(inputfile, str):
8993
inputfile = mesonlib.File.from_source_file(state.environment.source_dir,
9094
state.subdir, inputfile)

test cases/frameworks/6 gettext/data/meson.build

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ i18n.merge_file(
1010

1111
# Use filename substitution for another file
1212
i18n.merge_file(
13-
input: 'test2.desktop.in',
13+
input: files('test2.desktop.in'),
1414
output: '@BASENAME@',
1515
type: 'desktop',
1616
po_dir: '../po',

0 commit comments

Comments
 (0)