aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2023-04-01 12:56:18 -0400
committerXavier Claessens <xclaesse@gmail.com>2023-05-05 16:47:04 -0400
commit1958ded04f2f072571e86bbd5e805c06a4b89704 (patch)
treef72e9ad262d50fd9e8081d6161bc63db0d36f439
parent0bea4b632e8592dd3afe22116cd53f1a3b5e3234 (diff)
downloadmeson-1958ded04f2f072571e86bbd5e805c06a4b89704.zip
meson-1958ded04f2f072571e86bbd5e805c06a4b89704.tar.gz
meson-1958ded04f2f072571e86bbd5e805c06a4b89704.tar.bz2
mcompile: Fix target name suggestions
-rw-r--r--mesonbuild/mcompile.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/mcompile.py b/mesonbuild/mcompile.py
index 43c449c..4e46702 100644
--- a/mesonbuild/mcompile.py
+++ b/mesonbuild/mcompile.py
@@ -119,7 +119,7 @@ def get_target_from_intro_data(target: ParsedTargetName, builddir: Path, introsp
elif len(found_targets) > 1:
suggestions: T.List[str] = []
for i in found_targets:
- p = Path(i['filename'][0]).relative_to(resolved_bdir)
+ p = Path(i['filename'][0]).relative_to(resolved_bdir).parent / i['name']
t = i['type'].replace(' ', '_')
suggestions.append(f'- ./{p}:{t}')
suggestions_str = '\n'.join(suggestions)