Skip to content

Commit

Permalink
Properly handle Files used in CustomTarget commands.
Browse files Browse the repository at this point in the history
  • Loading branch information
QuLogic committed Aug 29, 2016
1 parent 8e904aa commit 6475bdb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mesonbuild/backend/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ def eval_custom_target_command(self, target, absolute_paths=False):
tmp = i.get_filename()[0]
i = os.path.join(self.get_target_dir(i), tmp)
elif isinstance(i, mesonlib.File):
i = os.path.join(i.subdir, i.fname)
i = i.rel_to_builddir(self.build_to_src)
if absolute_paths:
i = os.path.join(self.environment.get_build_dir(), i)
# FIXME: str types are blindly added and ignore the 'absolute_paths' argument
Expand Down
2 changes: 1 addition & 1 deletion test cases/common/57 custom target chain/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ python = find_program('python3')

comp = '@0@/@1@'.format(meson.current_source_dir(), 'my_compiler.py')
comp2 = '@0@/@1@'.format(meson.current_source_dir(), 'my_compiler2.py')
infile = '@0@/@1@'.format(meson.current_source_dir(), 'data_source.txt')
infile = files('data_source.txt')[0]

mytarget = custom_target('bindat',
output : 'data.dat',
Expand Down

0 comments on commit 6475bdb

Please sign in to comment.