diff options
author | Elliott Sales de Andrade <quantum.analyst@gmail.com> | 2016-08-28 14:14:15 -0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-08-28 21:14:15 +0300 |
commit | cd03df4a4c7e01500add5fc276075c15daf417c9 (patch) | |
tree | 1d6a91e8e9b1d924257fefea4c37f693f6fdfa70 | |
parent | 7830cb61c39fbaf57933ac403dcdf5007667d87d (diff) | |
download | meson-cd03df4a4c7e01500add5fc276075c15daf417c9.zip meson-cd03df4a4c7e01500add5fc276075c15daf417c9.tar.gz meson-cd03df4a4c7e01500add5fc276075c15daf417c9.tar.bz2 |
Fix CustomTargets used as input to CustomTargets. (#727)
-rw-r--r-- | mesonbuild/backend/backends.py | 2 | ||||
-rw-r--r-- | test cases/common/57 custom target chain/installed_files.txt | 1 | ||||
-rw-r--r-- | test cases/common/57 custom target chain/meson.build | 8 |
3 files changed, 10 insertions, 1 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index 739e751..120280f 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -527,7 +527,7 @@ class Backend(): i = i.held_object if isinstance(i, str): fname = [os.path.join(self.build_to_src, target.subdir, i)] - elif isinstance(i, build.BuildTarget): + elif isinstance(i, (build.BuildTarget, build.CustomTarget)): fname = [self.get_target_filename(i)] elif isinstance(i, build.GeneratedList): fname = [os.path.join(self.get_target_private_dir(target), p) for p in i.get_outfilelist()] diff --git a/test cases/common/57 custom target chain/installed_files.txt b/test cases/common/57 custom target chain/installed_files.txt index 4e326a2..7feb072 100644 --- a/test cases/common/57 custom target chain/installed_files.txt +++ b/test cases/common/57 custom target chain/installed_files.txt @@ -1 +1,2 @@ usr/subdir/data2.dat +usr/subdir/data3.dat diff --git a/test cases/common/57 custom target chain/meson.build b/test cases/common/57 custom target chain/meson.build index 286ff61..73e15ea 100644 --- a/test cases/common/57 custom target chain/meson.build +++ b/test cases/common/57 custom target chain/meson.build @@ -18,4 +18,12 @@ mytarget2 = custom_target('bindat2', install_dir : 'subdir' ) +mytarget3 = custom_target('bindat3', + output : 'data3.dat', + input : [mytarget], + command : [python, comp2, '@INPUT@', '@OUTPUT@'], + install : true, + install_dir : 'subdir' +) + subdir('usetarget') |