diff options
author | Elliott Sales de Andrade <quantum.analyst@gmail.com> | 2016-08-29 04:29:49 -0400 |
---|---|---|
committer | Elliott Sales de Andrade <quantum.analyst@gmail.com> | 2016-08-29 04:29:49 -0400 |
commit | 6475bdbe20e966e060d984823adaa12dbd6f1011 (patch) | |
tree | 7e06d63eb7806d3cf4074f99dfa992851aec928b | |
parent | 8e904aaba038dcb4fafbe9c97567776391fd328b (diff) | |
download | meson-6475bdbe20e966e060d984823adaa12dbd6f1011.zip meson-6475bdbe20e966e060d984823adaa12dbd6f1011.tar.gz meson-6475bdbe20e966e060d984823adaa12dbd6f1011.tar.bz2 |
Properly handle Files used in CustomTarget commands.
-rw-r--r-- | mesonbuild/backend/backends.py | 2 | ||||
-rw-r--r-- | test cases/common/57 custom target chain/meson.build | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index 120280f..b5b3b5a 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -547,7 +547,7 @@ class Backend(): 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 diff --git a/test cases/common/57 custom target chain/meson.build b/test cases/common/57 custom target chain/meson.build index 73e15ea..1af0425 100644 --- a/test cases/common/57 custom target chain/meson.build +++ b/test cases/common/57 custom target chain/meson.build @@ -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', |