From 2034e303ada98b51d081aec02e0ed9a2546c266b Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Thu, 7 Dec 2017 19:15:59 +0530 Subject: 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. --- gir/meson.build | 28 ++++++++++++++++++++++++---- 1 file 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', -- cgit v1.2.1