Skip to content

Commit

Permalink
Fix merge file using an array. Closes mesonbuild#4424.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpakkane committed Oct 29, 2018
1 parent a52cd31 commit fe3efe0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions mesonbuild/modules/i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ def merge_file(self, state, args, kwargs):
if hasattr(inputfile, 'held_object'):
ct = build.CustomTarget(kwargs['output'] + '_merge', state.subdir, state.subproject, kwargs)
else:
if isinstance(inputfile, list):
# We only use this input file to create a name of the custom target.
# Thus we can ignore the other entries.
inputfile = inputfile[0]
if isinstance(inputfile, str):
inputfile = mesonlib.File.from_source_file(state.environment.source_dir,
state.subdir, inputfile)
Expand Down
2 changes: 1 addition & 1 deletion test cases/frameworks/6 gettext/data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ i18n.merge_file(

# Use filename substitution for another file
i18n.merge_file(
input: 'test2.desktop.in',
input: files('test2.desktop.in'),
output: '@BASENAME@',
type: 'desktop',
po_dir: '../po',
Expand Down

0 comments on commit fe3efe0

Please sign in to comment.