From 23ac32c19669148acc5652ec1d5a48c767fe58dc Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sat, 12 Apr 2014 01:20:31 +0300 Subject: [PATCH] Moc tuning. --- ninjabackend.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ninjabackend.py b/ninjabackend.py index 8215959be..2a850bee4 100644 --- a/ninjabackend.py +++ b/ninjabackend.py @@ -817,7 +817,14 @@ class NinjaBackend(backends.Backend): elem.add_item('rcc_flags', ['--name', basename]) elem.write(outfile) if self.is_compilable_file(outfilename): - src_deps.append(outfilename) + if rule.name == 'moc_hdr_compile' or rule.name == 'moc_src_compile': + manual_mocs = target.get_original_kwargs().get('manual_moc_include', []) + if src in manual_mocs: + other_deps.append(outfilename) + else: + src_deps.append(outfilename) + else: + src_deps.append(outfilename) else: other_deps.append(outfilename) if rule.name == 'moc_src_compile': #HACK