diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-10-21 07:30:29 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-10-21 08:00:39 +0530 |
commit | b070f505d362ecb9047b8da09737a127abeed613 (patch) | |
tree | 60e4f3afb17753c562f7dc16d4f9e53f27ab3c2d | |
parent | 8bee336e2a9bf0033d2fa852a48d6d17ce2a8869 (diff) | |
download | meson-b070f505d362ecb9047b8da09737a127abeed613.zip meson-b070f505d362ecb9047b8da09737a127abeed613.tar.gz meson-b070f505d362ecb9047b8da09737a127abeed613.tar.bz2 |
ninja: Generate Vala compile rules after all header_deps are found
Same reason as generated C sources
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index fe3be4c..1f9357b 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -353,9 +353,11 @@ int dummy; src_list.append(src) obj_list.append(self.generate_single_compile(target, outfile, src, True, header_deps=header_deps)) + # Generate compilation targets for C sources generated from Vala # sources. This can be extended to other $LANG->C compilers later if # necessary. This needs to be separate for at least Vala + vala_generated_source_files = [] for src in vala_generated_sources: raw_src = RawFilename(src) src_list.append(src) @@ -371,10 +373,15 @@ int dummy; if self.environment.is_header(src): header_deps.append(raw_src) else: - # Passing 'vala' here signifies that we want the compile - # arguments to be specialized for C code generated by - # valac. For instance, no warnings should be emitted. - obj_list.append(self.generate_single_compile(target, outfile, raw_src, 'vala', [], header_deps)) + # We gather all these and generate compile rules below + # after `header_deps` (above) is fully generated + vala_generated_source_files.append(raw_src) + for src in vala_generated_source_files: + # Passing 'vala' here signifies that we want the compile + # arguments to be specialized for C code generated by + # valac. For instance, no warnings should be emitted. + obj_list.append(self.generate_single_compile(target, outfile, src, 'vala', [], header_deps)) + # Generate compile targets for all the pre-existing sources for this target for f, src in target_sources.items(): if not self.environment.is_header(src): |