From a83eb4ddb2f3468063af01e094c171b08c551cf7 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Tue, 22 Aug 2017 14:44:32 -0300 Subject: [PATCH] ninjabackend: Add support for generated csharp sources. --- mesonbuild/backend/ninjabackend.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index ec811cbae..1f6a80b98 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -987,11 +987,20 @@ int dummy; outputs = [outname_rel, outname_rel + '.mdb'] else: outputs = [outname_rel] + generated_sources = self.get_target_generated_sources(target) + for rel_src in generated_sources.keys(): + dirpart, fnamepart = os.path.split(rel_src) + if rel_src.lower().endswith('.cs'): + rel_srcs.append(rel_src) + deps.append(rel_src) + elem = NinjaBuildElement(self.all_outputs, outputs, 'cs_COMPILER', rel_srcs) elem.add_dep(deps) elem.add_item('ARGS', commands) elem.write(outfile) + self.generate_generator_list_rules(target, outfile) + def generate_single_java_compile(self, src, target, compiler, outfile): args = [] args += compiler.get_buildtype_args(self.get_option_for_target('buildtype', target))