aboutsummaryrefslogtreecommitdiff
path: root/mesonintrospect.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2014-04-25 22:13:15 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2014-04-25 22:13:15 +0300
commit77e9a245893909e33c753f472e8cee13174921c2 (patch)
treee1f9d25b997eca289f8350239f8cf2ac31fff376 /mesonintrospect.py
parentc06c9ea83e7584539e1a09ba3acd8035444d22c9 (diff)
downloadmeson-77e9a245893909e33c753f472e8cee13174921c2.zip
meson-77e9a245893909e33c753f472e8cee13174921c2.tar.gz
meson-77e9a245893909e33c753f472e8cee13174921c2.tar.bz2
Can specify extra files that show up in IDEs as parts of a target.
Diffstat (limited to 'mesonintrospect.py')
-rwxr-xr-xmesonintrospect.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/mesonintrospect.py b/mesonintrospect.py
index 443eb1a..86d65b1 100755
--- a/mesonintrospect.py
+++ b/mesonintrospect.py
@@ -54,12 +54,14 @@ def list_targets(coredata, builddata):
def list_target_files(target_name, coredata, builddata):
try:
- sources = builddata.targets[target_name].sources
- subdir = builddata.targets[target_name].subdir
+ t = builddata.targets[target_name]
+ sources = t.sources + t.extra_files
+ subdir = t.subdir
except KeyError:
print("Unknown target %s." % target_name)
sys.exit(1)
- print(json.dumps([os.path.join(subdir, i) for i in sources]))
+ sources = [os.path.join(subdir, i) for i in sources]
+ print(json.dumps(sources))
if __name__ == '__main__':
(options, args) = parser.parse_args()