aboutsummaryrefslogtreecommitdiff
path: root/interpreter.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2014-02-24 00:43:45 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2014-02-24 00:43:45 +0200
commite0c4447666837d92db63f4dfc8e949cbd4520327 (patch)
treeec229ac84b8d0e5252fdf59b5d9466d7253fb913 /interpreter.py
parent2444eb357e1e19b5b7f77de4db9cf8ad26e82848 (diff)
downloadmeson-e0c4447666837d92db63f4dfc8e949cbd4520327.zip
meson-e0c4447666837d92db63f4dfc8e949cbd4520327.tar.gz
meson-e0c4447666837d92db63f4dfc8e949cbd4520327.tar.bz2
Test for recursive instantiations of subprojects.
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 51b1ebc..88f4b74 100644
--- a/interpreter.py
+++ b/interpreter.py
@@ -797,7 +797,7 @@ class Interpreter():
if self.subdir != '':
raise InterpreterException('Subprojects must be defined at the root directory.')
if dirname in self.subproject_stack:
- fullstack = self.subdir_stack + [dirname]
+ fullstack = self.subproject_stack + [dirname]
incpath = ' => '.join(fullstack)
raise InterpreterException('Recursive include of subprojects: %s.' % incpath)
if dirname == self.subprojects:
@@ -809,7 +809,7 @@ class Interpreter():
self.global_flags_frozen = True
mlog.log('\nExecuting subproject ', mlog.bold(dirname), '.\n', sep='')
subi = Interpreter(self.build, subdir)
- subi.subproject_stack = self.subproject_stack + [subdir]
+ subi.subproject_stack = self.subproject_stack + [dirname]
subi.run()
mlog.log('\nSubproject', mlog.bold(dirname), 'finished.')
self.build.subprojects[dirname] = True