aboutsummaryrefslogtreecommitdiff
path: root/interpreter.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-08-12 14:04:41 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2015-08-12 14:04:41 +0300
commit05d929d542890df227584740cb33fa22334fdb4b (patch)
treed4b73eee0826b570bfd38beacb2dfb8633c96ea8 /interpreter.py
parente3873e89d11aa92c41393d69791e8fc5b24328ce (diff)
downloadmeson-05d929d542890df227584740cb33fa22334fdb4b.zip
meson-05d929d542890df227584740cb33fa22334fdb4b.tar.gz
meson-05d929d542890df227584740cb33fa22334fdb4b.tar.bz2
Fix introspection and make it possible to have top level targets with the same name in subprojects. Fixes #222.
Diffstat (limited to 'interpreter.py')
-rw-r--r--interpreter.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/interpreter.py b/interpreter.py
index b368d80..78cbf86 100644
--- a/interpreter.py
+++ b/interpreter.py
@@ -1663,7 +1663,7 @@ class Interpreter():
% name)
# To permit an executable and a shared library to have the
# same name, such as "foo.exe" and "libfoo.a".
- idname = name + tobj.type_suffix()
+ idname = tobj.get_id()
if idname in self.build.targets:
raise InvalidCode('Tried to create target "%s", but a target of that name already exists.' % name)
self.build.targets[idname] = tobj
@@ -1704,7 +1704,7 @@ class Interpreter():
else:
mlog.debug('Unknown target type:', str(targetholder))
raise RuntimeError('Unreachable code')
- target = targetclass(name, self.subdir, is_cross, sources, objs, self.environment, kwargs)
+ target = targetclass(name, self.subdir, self.subproject, is_cross, sources, objs, self.environment, kwargs)
l = targetholder(target)
self.add_target(name, l.held_object)
self.global_args_frozen = True