Put targets in their subdirectories.

pull/15/head
Jussi Pakkanen 11 years ago
parent cce822c3ec
commit 65e4971685
  1. 6
      backends.py
  2. 6
      xcodebackend.py

@ -107,7 +107,6 @@ class Backend():
self.interpreter = interp
self.processed_targets = {}
self.dep_rules = {}
self.output_path_override = None
self.build_to_src = os.path.relpath(self.environment.get_source_dir(),
self.environment.get_build_dir())
@ -129,10 +128,7 @@ class Backend():
return filename
def get_target_dir(self, target):
if self.output_path_override is None:
dirname = target.get_subdir()
else:
dirname = self.output_path_override
dirname = target.get_subdir()
os.makedirs(os.path.join(self.environment.get_build_dir(), dirname), exist_ok=True)
return dirname

@ -20,7 +20,6 @@ class XCodeBackend(backends.Backend):
super().__init__(build, interp)
self.project_uid = self.environment.coredata.guid.replace('-', '')[:24]
self.project_conflist = self.gen_id()
self.output_path_override = self.environment.coredata.buildtype
self.indent = ' '
self.indent_level = 0
self.xcodetypemap = {'c' : 'sourcecode.c.c',
@ -41,6 +40,11 @@ class XCodeBackend(backends.Backend):
def gen_id(self):
return str(uuid.uuid4()).upper().replace('-', '')[:24]
def get_target_dir(self, target):
dirname = os.path.join(target.get_subdir(), self.environment.coredata.buildtype)
os.makedirs(os.path.join(self.environment.get_build_dir(), dirname), exist_ok=True)
return dirname
def write_line(self, text):
self.ofile.write(self.indent*self.indent_level + text)
if not text.endswith('\n'):

Loading…
Cancel
Save