aboutsummaryrefslogtreecommitdiff
path: root/interpreter.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2013-01-01 20:28:00 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2013-01-01 20:28:00 +0200
commit04ac73e8ea498c3fb64138d8214d6d25616161bc (patch)
tree548892c996562aac0b2d26b553a8655dc724eeb7 /interpreter.py
parent221f175cfb9625e21a39794fb5488b54378c5e73 (diff)
downloadmeson-04ac73e8ea498c3fb64138d8214d6d25616161bc.zip
meson-04ac73e8ea498c3fb64138d8214d6d25616161bc.tar.gz
meson-04ac73e8ea498c3fb64138d8214d6d25616161bc.tar.bz2
Renamed executables variable to targets.
Diffstat (limited to 'interpreter.py')
-rwxr-xr-xinterpreter.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/interpreter.py b/interpreter.py
index 2b12db3..66059ac 100755
--- a/interpreter.py
+++ b/interpreter.py
@@ -71,15 +71,15 @@ class Interpreter():
self.sanity_check_ast()
self.project = None
self.compilers = []
- self.executables = {}
+ self.targets = {}
self.variables = {}
self.scratch_dir = scratch_dir
def get_project(self):
return self.project
- def get_executables(self):
- return self.executables
+ def get_targets(self):
+ return self.targets
def sanity_check_ast(self):
if not isinstance(self.ast, nodes.CodeBlock):
@@ -149,10 +149,10 @@ class Interpreter():
raise InvalidArguments('Line %d: Argument %s is not a string.' % str(a))
name = args[0]
sources = args[1:]
- if name in self.executables:
- raise InvalidCode('Line %d, tried to create executable "%s", which already exists.' % (node.lineno(), name))
+ if name in self.target:
+ raise InvalidCode('Line %d, tried to create executable "%s", but a build target of that name already exists.' % (node.lineno(), name))
exe = Executable(name, sources)
- self.executables[name] = exe
+ self.targets[name] = exe
print('Creating executable %s with %d files.' % (name, len(sources)))
return exe