|
|
@ -129,10 +129,9 @@ class Vs2010Backend(backends.Backend): |
|
|
|
args = self.replace_outputs(args, target_private_dir, outfiles_rel) |
|
|
|
args = self.replace_outputs(args, target_private_dir, outfiles_rel) |
|
|
|
args = [x.replace("@SOURCE_DIR@", self.environment.get_source_dir()).replace("@BUILD_DIR@", target_private_dir) |
|
|
|
args = [x.replace("@SOURCE_DIR@", self.environment.get_source_dir()).replace("@BUILD_DIR@", target_private_dir) |
|
|
|
for x in args] |
|
|
|
for x in args] |
|
|
|
fullcmd = exe_arr + self.replace_extra_args(args, genlist) |
|
|
|
cmd = exe_arr + self.replace_extra_args(args, genlist) |
|
|
|
command = ' '.join(self.special_quote(fullcmd)) |
|
|
|
|
|
|
|
cbs = ET.SubElement(idgroup, 'CustomBuild', Include=infilename) |
|
|
|
cbs = ET.SubElement(idgroup, 'CustomBuild', Include=infilename) |
|
|
|
ET.SubElement(cbs, 'Command').text = command |
|
|
|
ET.SubElement(cbs, 'Command').text = ' '.join(self.quote_arguments(cmd)) |
|
|
|
ET.SubElement(cbs, 'Outputs').text = ';'.join(outfiles) |
|
|
|
ET.SubElement(cbs, 'Outputs').text = ';'.join(outfiles) |
|
|
|
return generator_output_files, custom_target_output_files, custom_target_include_dirs |
|
|
|
return generator_output_files, custom_target_output_files, custom_target_include_dirs |
|
|
|
|
|
|
|
|
|
|
@ -331,8 +330,8 @@ class Vs2010Backend(backends.Backend): |
|
|
|
directories = os.path.normpath(target.subdir).split(os.sep) |
|
|
|
directories = os.path.normpath(target.subdir).split(os.sep) |
|
|
|
return os.sep.join(['..'] * len(directories)) |
|
|
|
return os.sep.join(['..'] * len(directories)) |
|
|
|
|
|
|
|
|
|
|
|
def special_quote(self, arr): |
|
|
|
def quote_arguments(self, arr): |
|
|
|
return ['"%s"' % i for i in arr] |
|
|
|
return ['"%s"' % i for i in arr] |
|
|
|
|
|
|
|
|
|
|
|
def create_basic_crap(self, target): |
|
|
|
def create_basic_crap(self, target): |
|
|
|
project_name = target.name |
|
|
|
project_name = target.name |
|
|
@ -404,8 +403,7 @@ class Vs2010Backend(backends.Backend): |
|
|
|
# from the target dir, not the build root. |
|
|
|
# from the target dir, not the build root. |
|
|
|
target.absolute_paths = True |
|
|
|
target.absolute_paths = True |
|
|
|
(srcs, ofilenames, cmd) = self.eval_custom_target_command(target, True) |
|
|
|
(srcs, ofilenames, cmd) = self.eval_custom_target_command(target, True) |
|
|
|
cmd_templ = '''"%s" ''' * len(cmd) |
|
|
|
ET.SubElement(customstep, 'Command').text = ' '.join(self.quote_arguments(cmd)) |
|
|
|
ET.SubElement(customstep, 'Command').text = cmd_templ % tuple(cmd) |
|
|
|
|
|
|
|
ET.SubElement(customstep, 'Outputs').text = ';'.join(ofilenames) |
|
|
|
ET.SubElement(customstep, 'Outputs').text = ';'.join(ofilenames) |
|
|
|
ET.SubElement(customstep, 'Inputs').text = ';'.join(srcs) |
|
|
|
ET.SubElement(customstep, 'Inputs').text = ';'.join(srcs) |
|
|
|
ET.SubElement(root, 'Import', Project='$(VCTargetsPath)\Microsoft.Cpp.targets') |
|
|
|
ET.SubElement(root, 'Import', Project='$(VCTargetsPath)\Microsoft.Cpp.targets') |
|
|
|