aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-11-28 21:58:11 +0200
committerGitHub <noreply@github.com>2018-11-28 21:58:11 +0200
commitb0611bdd9a2c21fb55ec5604c445bca124011ab3 (patch)
tree50e2c8a677789dc2f46121685912e66fdc50ece5 /mesonbuild
parentd502e83493ea24e31c2b9e1034baf0a9408009ba (diff)
parente702d754b150dea00dcdf0956bc958d059e47ce9 (diff)
downloadmeson-b0611bdd9a2c21fb55ec5604c445bca124011ab3.zip
meson-b0611bdd9a2c21fb55ec5604c445bca124011ab3.tar.gz
meson-b0611bdd9a2c21fb55ec5604c445bca124011ab3.tar.bz2
Merge pull request #3061 from jon-turney/introspect-custom-target-files
Fix 'meson introspect --target-files' for a custom target
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/interpreter.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index e820afb..4f09c0f 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -3252,6 +3252,12 @@ external dependencies (including libraries) must go to "dependencies".''')
'Implementation-only, without FeatureNew checks, for internal use'
name = args[0]
kwargs['install_mode'] = self._get_kwarg_install_mode(kwargs)
+ if 'input' in kwargs:
+ try:
+ kwargs['input'] = self.source_strings_to_files(extract_as_list(kwargs, 'input'))
+ except mesonlib.MesonException:
+ mlog.warning('''Custom target input \'%s\' can\'t be converted to File object(s).
+This will become a hard error in the future.''' % kwargs['input'])
tg = CustomTargetHolder(build.CustomTarget(name, self.subdir, self.subproject, kwargs), self)
self.add_target(name, tg.held_object)
return tg
@@ -3943,7 +3949,7 @@ Try setting b_lundef to false instead.'''.format(self.coredata.base_options['b_s
sources = [sources]
for s in sources:
if isinstance(s, (mesonlib.File, GeneratedListHolder,
- CustomTargetHolder, CustomTargetIndexHolder)):
+ TargetHolder, CustomTargetIndexHolder)):
pass
elif isinstance(s, str):
self.validate_within_subproject(self.subdir, s)