summaryrefslogtreecommitdiff
path: root/gir
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-12-07 19:15:59 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2018-03-10 19:05:19 +0530
commit2034e303ada98b51d081aec02e0ed9a2546c266b (patch)
tree588e464dccc764c2bdbfab966684eedda8a283d2 /gir
parent5c468691b6accb2c3e910931bc0f60f846fe9e89 (diff)
downloadgobject-introspection-2034e303ada98b51d081aec02e0ed9a2546c266b.tar.gz
meson: Prefer source annotations for gir generation
Otherwise we will see the fallback annotations provided in glib-2.0.c etc and use them instead of the up-to-date annotations in glib's source code.
Diffstat (limited to 'gir')
-rw-r--r--gir/meson.build28
1 files changed, 24 insertions, 4 deletions
diff --git a/gir/meson.build b/gir/meson.build
index 80766335..e1d0119f 100644
--- a/gir/meson.build
+++ b/gir/meson.build
@@ -67,7 +67,7 @@ for f in glob('@0@'):
'''
# GLib
-glib_files = files('glib-2.0.c')
+glib_files = []
glib_command = scanner_command + [
'--identifier-prefix=G',
'--symbol-prefix=g',
@@ -154,6 +154,11 @@ foreach h : glib_headers
endif
endforeach
+# NOTE: Always add this last so that we prefer the annotations in the sources
+# (if they are available) since it contains 'backup' annotations that can be
+# out of date.
+glib_files += files('glib-2.0.c')
+
glib_gir = custom_target('gir-glib',
input: glib_files,
output: 'GLib-2.0.gir',
@@ -174,7 +179,7 @@ glib_gir = custom_target('gir-glib',
gir_files += glib_gir
# GObject
-gobject_files = files('gobject-2.0.c')
+gobject_files = []
gobject_command = scanner_command + [
'--identifier-prefix=G',
'--c-include=glib-object.h',
@@ -212,6 +217,11 @@ foreach h : gobject_headers
endif
endforeach
+# NOTE: Always add this last so that we prefer the annotations in the sources
+# (if they are available) since it contains 'backup' annotations that can be
+# out of date.
+gobject_files += files('gobject-2.0.c')
+
gobject_gir = custom_target('gir-gobject',
input: gobject_files,
output: 'GObject-2.0.gir',
@@ -231,7 +241,7 @@ gobject_gir = custom_target('gir-gobject',
gir_files += gobject_gir
# GModule
-gmodule_files = files('gmodule-2.0.c')
+gmodule_files = []
gmodule_command = scanner_command + [
'--identifier-prefix=G',
'--symbol-prefix=g',
@@ -254,6 +264,11 @@ else
join_paths(glibproj_incdir, 'gmodule', 'gmodule.c')]
endif
+# NOTE: Always add this last so that we prefer the annotations in the sources
+# (if they are available) since it contains 'backup' annotations that can be
+# out of date.
+gmodule_files += files('gmodule-2.0.c')
+
gir_files += custom_target('gir-gmodule',
input: gmodule_files,
output: 'GModule-2.0.gir',
@@ -270,7 +285,7 @@ gir_files += custom_target('gir-gmodule',
)
## Gio
-gio_files = files('gio-2.0.c')
+gio_files = []
gio_command = scanner_command + [
'--identifier-prefix=G',
'--symbol-prefix=g',
@@ -337,6 +352,11 @@ if giounix_dep.found()
endforeach
endif
+# NOTE: Always add this last so that we prefer the annotations in the sources
+# (if they are available) since it contains 'backup' annotations that can be
+# out of date.
+gio_files += files('gio-2.0.c')
+
gir_files += custom_target('gir-gio',
input: gio_files,
output: 'Gio-2.0.gir',