Some fixes.

This commit is contained in:
Jussi Pakkanen 2013-01-01 20:32:43 +02:00
parent 04ac73e8ea
commit 347dda92af
2 changed files with 2 additions and 2 deletions

View File

@ -149,7 +149,7 @@ class Interpreter():
raise InvalidArguments('Line %d: Argument %s is not a string.' % str(a))
name = args[0]
sources = args[1:]
if name in self.target:
if name in self.targets:
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.targets[name] = exe

View File

@ -98,6 +98,6 @@ if __name__ == '__main__':
import interpreter, environment
os.chdir(os.path.split(__file__)[0])
envir = environment.Environment('.', 'work area')
intpr = interpreter.Interpreter(code)
intpr = interpreter.Interpreter(code, envir.get_scratch_dir())
g = ShellGenerator(intpr, envir)
g.generate()