Fixed subproject compiler detection.

pull/15/head
Jussi Pakkanen 11 years ago
parent 8e9879a83c
commit 6495334b03
  1. 6
      build.py
  2. 4
      interpreter.py

@ -44,11 +44,17 @@ class Build:
def add_compiler(self, compiler):
if len(self.compilers) == 0:
self.static_linker = self.environment.detect_static_linker(compiler)
for i in self.compilers:
if i.get_language() == compiler.get_language():
return
self.compilers.append(compiler)
def add_cross_compiler(self, compiler):
if len(self.cross_compilers) == 0:
self.static_cross_linker = self.environment.detect_static_linker(compiler)
for i in self.cross_compilers:
if i.get_language() == compiler.get_language():
return
self.cross_compilers.append(compiler)
def get_project(self):

@ -718,7 +718,7 @@ class Interpreter():
raise InterpreterException('Argument languages must be a list of strings.')
# TODO: check that elements are strings
if len(self.build.pot) > 0:
raise InterpreterException('More than one gettext definitions currently not supported.')
raise InterpreterException('More than one gettext definition currently not supported.')
self.build.pot.append((packagename, languages, self.subdir))
def func_option(self, nodes, args, kwargs):
@ -739,8 +739,10 @@ class Interpreter():
if not os.path.isdir(abs_subdir):
raise InterpreterException('Subproject directory does not exist.')
self.global_flags_frozen = True
mlog.log('\nExecuting subproject ', mlog.bold(dirname), '.\n', sep='')
subi = Interpreter(self.build, subdir)
subi.run()
mlog.log('\nSubproject finished.\n')
self.subprojects[dirname] = SubprojectHolder(subi)
return self.subprojects[dirname]

Loading…
Cancel
Save