From 68fdef88cbf3a9c0a08b565c40879102f753f19a Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sun, 4 Oct 2015 01:06:57 +0300 Subject: [PATCH] Make generated header dependencies transitive. --- ninjabackend.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ninjabackend.py b/ninjabackend.py index a8674dfce..e011848cc 100644 --- a/ninjabackend.py +++ b/ninjabackend.py @@ -169,7 +169,10 @@ class NinjaBackend(backends.Backend): continue for src in gensource.get_outfilelist(): if self.environment.is_header(src): - header_deps.append(src) + header_deps.append(os.path.join(self.get_target_private_dir(target), src)) + for dep in target.link_targets: + if isinstance(dep, (build.StaticLibrary, build.SharedLibrary)): + header_deps += self.get_generated_headers(dep) return header_deps def generate_target(self, target, outfile):