aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2019-01-07 01:02:03 +0100
committerDaniel Mensinger <daniel@mensinger-ka.de>2019-01-07 22:35:56 +0100
commit5c139032b80cda76a111744b745c04dacc17df42 (patch)
tree90a59d79657a4e4373cb2c2efd58a5a65cc434e6 /mesonbuild
parent29dd57dcbf248e66ef5ed37c3f5a5cdead0e4817 (diff)
downloadmeson-5c139032b80cda76a111744b745c04dacc17df42.zip
meson-5c139032b80cda76a111744b745c04dacc17df42.tar.gz
meson-5c139032b80cda76a111744b745c04dacc17df42.tar.bz2
Deprecated --target-files API
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/mintro.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/mesonbuild/mintro.py b/mesonbuild/mintro.py
index b09ea88..233136e 100644
--- a/mesonbuild/mintro.py
+++ b/mesonbuild/mintro.py
@@ -293,7 +293,8 @@ def list_buildoptions_from_source(sourcedir, backend, indent):
mlog.enable()
print(json.dumps(list_buildoptions(intr.coredata), indent=indent))
-def list_target_files(target_name, targets):
+def list_target_files(target_name, targets, builddata: build.Build):
+ sys.stderr.write("WARNING: The --target-files introspection API is deprecated. Use --targets instead.\n")
result = []
tgt = None
@@ -309,6 +310,8 @@ def list_target_files(target_name, targets):
for i in tgt['target_sources']:
result += i['sources'] + i['generated_sources']
+ result = list(map(lambda x: os.path.relpath(x, builddata.environment.get_source_dir()), result))
+
return result
def list_buildoptions(coredata: cdata.CoreData):
@@ -379,6 +382,7 @@ def find_buildsystem_files_list(src_dir):
def list_buildsystem_files(builddata: build.Build):
src_dir = builddata.environment.get_source_dir()
filelist = find_buildsystem_files_list(src_dir)
+ filelist = [os.path.join(src_dir, x) for x in filelist]
return filelist
def list_deps(coredata: cdata.CoreData):
@@ -523,7 +527,8 @@ def run(options):
targets_file = os.path.join(infodir, 'intro-targets.json')
with open(targets_file, 'r') as fp:
targets = json.load(fp)
- results += [('target_files', list_target_files(options.target_files, targets))]
+ builddata = build.load(options.builddir)
+ results += [('target_files', list_target_files(options.target_files, targets, builddata))]
# Extract introspection information from JSON
for i in toextract: