diff --git a/docs/reference/gobject/meson.build b/docs/reference/gobject/meson.build index e955e9907..175520b64 100644 --- a/docs/reference/gobject/meson.build +++ b/docs/reference/gobject/meson.build @@ -7,7 +7,7 @@ if get_option('gtk_doc') 'gobject_probes.h', 'gobject_trace.h', 'gtype-private.h', - 'gobjectenumtypes.h' + 'glib-enumtypes.h', ] ignore_decorators = [ diff --git a/gio/meson.build b/gio/meson.build index 8f989bfe9..88575ec75 100644 --- a/gio/meson.build +++ b/gio/meson.build @@ -754,7 +754,7 @@ gioenumtypes_c = custom_target('gioenumtypes_c', '--template', files('gioenumtypes.c.template'), '@INPUT@', gnetworking_h]) -gioenumtypes_dep = declare_dependency(sources : [gioenumtypes_h, gobjectenumtypes_h]) +gioenumtypes_dep = declare_dependency(sources : [gioenumtypes_h, glib_enumtypes_h]) # inotify if glib_conf.has('HAVE_SYS_INOTIFY_H') and have_func_inotify_init1 diff --git a/glib/glib-object.h b/glib/glib-object.h index 53b53d50f..9561a6528 100644 --- a/glib/glib-object.h +++ b/glib/glib-object.h @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include diff --git a/gobject/gobjectenumtypes.c.template b/gobject/glib-enumtypes.c.template similarity index 96% rename from gobject/gobjectenumtypes.c.template rename to gobject/glib-enumtypes.c.template index f926a463a..b7d36728f 100644 --- a/gobject/gobjectenumtypes.c.template +++ b/gobject/glib-enumtypes.c.template @@ -1,6 +1,6 @@ /*** BEGIN file-header ***/ #include "config.h" -#include "gobjectenumtypes.h" +#include "glib-enumtypes.h" #include /*** END file-header ***/ diff --git a/gobject/gobjectenumtypes.h.template b/gobject/glib-enumtypes.h.template similarity index 100% rename from gobject/gobjectenumtypes.h.template rename to gobject/glib-enumtypes.h.template diff --git a/gobject/meson.build b/gobject/meson.build index 159f33ee3..db8d3c4e9 100644 --- a/gobject/meson.build +++ b/gobject/meson.build @@ -85,33 +85,41 @@ foreach tool: python_tools meson.override_find_program(tool, tool_bin) endforeach +# Generate a header file containing the GObject enum types for the enums defined +# in libglib. +# +# For now, we only include gunicode.h here, since GScriptType is needed for +# Pango. More headers can be added as needed in future. +# # We can't use gnome.mkenums() because the GNOME module looks for glib-mkenums # in PATH, which means you can't bootstrap glib with its own glib-mkenums. -gobjectenumtypes_h = custom_target('gobjectenumtypes_h', - output : 'gobjectenumtypes.h', +glib_enumtypes_input_headers = files( + '../glib/gunicode.h', +) + +glib_enumtypes_h = custom_target('glib_enumtypes_h', + output : 'glib-enumtypes.h', capture : true, - input : '../glib/gunicode.h', + input : glib_enumtypes_input_headers, install : true, install_dir : join_paths(get_option('includedir'), 'glib-2.0/gobject'), command : [python, glib_mkenums, - '--template', files('gobjectenumtypes.h.template'), + '--template', files('glib-enumtypes.h.template'), '@INPUT@']) -# For now, we only include gunicode.h here, since GScriptType is needed for pango -# More headers can be added as needed -gobjectenumtypes_c = custom_target('gobjectenumtypes_c', - output : 'gobjectenumtypes.c', +glib_enumtypes_c = custom_target('glib_enumtypes_c', + output : 'glib-enumtypes.c', capture : true, - input : '../glib/gunicode.h', - depends : [gobjectenumtypes_h], + input : glib_enumtypes_input_headers, + depends : [glib_enumtypes_h], command : [python, glib_mkenums, - '--template', files('gobjectenumtypes.c.template'), + '--template', files('glib-enumtypes.c.template'), '@INPUT@']) -gobjectenumtypes_dep = declare_dependency(sources : [gobjectenumtypes_h]) +glib_enumtypes_dep = declare_dependency(sources : [glib_enumtypes_h]) libgobject = library('gobject-2.0', - gobject_dtrace_obj, gobject_dtrace_hdr, gobjectenumtypes_h, gobjectenumtypes_c, + gobject_dtrace_obj, gobject_dtrace_hdr, glib_enumtypes_h, glib_enumtypes_c, sources : gobject_sources, version : library_version, soversion : soversion, @@ -134,7 +142,7 @@ pkg.generate(libgobject, libgobject_dep = declare_dependency(link_with : libgobject, include_directories : [gobjectinc], - dependencies : [libglib_dep, gobjectenumtypes_dep]) + dependencies : [libglib_dep, glib_enumtypes_dep]) executable('gobject-query', 'gobject-query.c', install : true,