From df357211a81a63919c64336ce7e4cc373a744e74 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Thu, 19 Mar 2015 12:29:27 +0200 Subject: [PATCH] Handle outputs in arrays in mesonintrospect. Closes #50. --- mesonintrospect.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mesonintrospect.py b/mesonintrospect.py index 1048f690e..4903c5eb1 100755 --- a/mesonintrospect.py +++ b/mesonintrospect.py @@ -44,7 +44,12 @@ def list_targets(coredata, builddata): for target in builddata.get_targets().values(): t = {} t['name'] = target.get_basename() - t['filename'] = os.path.join(target.subdir, target.get_filename()) + fname = target.get_filename() + if isinstance(fname, list): + fname = [os.path.join(target.subdir, x) for x in fname] + else: + fname = os.path.join(target.subdir, fname) + t['filename'] = fname if isinstance(target, build.Executable): typename = 'executable' elif isinstance(target, build.SharedLibrary):