aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2018-12-11 17:50:38 +0100
committerDaniel Mensinger <daniel@mensinger-ka.de>2019-01-06 12:19:30 +0100
commit7691b0460c53478cfc2e11fca156557add6579bf (patch)
tree2831b2421bc8bd3e40fea62232a8a415a96f638e /mesonbuild/backend/backends.py
parentb9c4913cf032144eed0cb6308aaff4e77a825f08 (diff)
downloadmeson-7691b0460c53478cfc2e11fca156557add6579bf.zip
meson-7691b0460c53478cfc2e11fca156557add6579bf.tar.gz
meson-7691b0460c53478cfc2e11fca156557add6579bf.tar.bz2
Ninja backend target introspection
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r--mesonbuild/backend/backends.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index b36b98c..b3b6df9 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -1158,7 +1158,8 @@ class Backend:
"language": "<LANG>",
"compiler": ["result", "of", "comp.get_exelist()"],
"parameters": ["list", "of", "compiler", "parameters],
- "source_files": ["list", "of", "all", "<LANG>", "source", "files"]
+ "sources": ["list", "of", "all", "<LANG>", "source", "files"],
+ "generated_sources": ["list", "of", "generated", "source", "files"]
}
]
@@ -1169,20 +1170,23 @@ class Backend:
source_list = []
for i in source_list_raw:
if isinstance(i, mesonlib.File):
- source_list += [os.path.join(i.subdir, i.fname)]
+ source_list += [i.absolute_path(self.environment.get_source_dir(), self.environment.get_build_dir())]
elif isinstance(i, str):
- source_list += [i]
+ source_list += [os.path.join(self.environment.get_source_dir(), i)]
+ source_list = list(map(lambda x: os.path.normpath(x), source_list))
return [{
'language': 'unknown',
'compiler': [],
'parameters': [],
- 'source_files': source_list
+ 'sources': source_list,
+ 'generated_sources': []
}]
return [{
'language': 'unknown',
'compiler': [],
'parameters': [],
- 'source_files': []
+ 'sources': [],
+ 'generated_sources': []
}]