summaryrefslogtreecommitdiff
path: root/vapigen/valavapigen.vala
diff options
context:
space:
mode:
Diffstat (limited to 'vapigen/valavapigen.vala')
-rw-r--r--vapigen/valavapigen.vala10
1 files changed, 9 insertions, 1 deletions
diff --git a/vapigen/valavapigen.vala b/vapigen/valavapigen.vala
index 055765f5d..2968b0ae1 100644
--- a/vapigen/valavapigen.vala
+++ b/vapigen/valavapigen.vala
@@ -160,8 +160,16 @@ class Vala.VAPIGen : Object {
// interface writer ignores external packages
foreach (SourceFile file in context.get_source_files ()) {
- if (!file.filename.has_suffix (".vapi") && file.filename in sources) {
+ if (file.filename.has_suffix (".vapi")) {
+ continue;
+ }
+ if (file.filename in sources) {
file.file_type = SourceFileType.SOURCE;
+ } else if (file.filename.has_suffix (".metadata")) {
+ string gir_filename = "%s.gir".printf (file.filename.ndup (file.filename.length - ".metadata".length));
+ if (gir_filename in sources) {
+ file.file_type = SourceFileType.SOURCE;
+ }
}
}