mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-03 01:36:17 +01:00
Put dependencies in typelibs, resolve them when loading
* gir/Makefile.am: Dep on Makefile * girepository/ginfo.c: Print out a nicer error message if we failed to load something. * girepository/girepository.c: Clean up default typelib handling; remove global default_typelib variable. Ensure we handle NULL repository in more places. Support dependency resolution. * tests/Makefile.am: Kill off gobject.gir, it conflicts with the real one. * tests/Object.gir: Depend on GObject. * tools/generate.c: Take --includedir argument to say which directories to search for typelibs. Print out dependencies. svn path=/trunk/; revision=541
This commit is contained in:
parent
8dd1802d1f
commit
91dcce4159
@ -41,6 +41,7 @@ gchar **input = NULL;
|
|||||||
gchar *output = NULL;
|
gchar *output = NULL;
|
||||||
gchar *mname = NULL;
|
gchar *mname = NULL;
|
||||||
gchar *shlib = NULL;
|
gchar *shlib = NULL;
|
||||||
|
gboolean include_cwd = FALSE;
|
||||||
gboolean debug = FALSE;
|
gboolean debug = FALSE;
|
||||||
gboolean verbose = FALSE;
|
gboolean verbose = FALSE;
|
||||||
|
|
||||||
@ -80,7 +81,7 @@ format_output (GTypelib *typelib)
|
|||||||
"{\n"
|
"{\n"
|
||||||
"\tGTypelib *typelib;\n"
|
"\tGTypelib *typelib;\n"
|
||||||
"\ttypelib = g_typelib_new_from_const_memory (_G_TYPELIB, _G_TYPELIB_SIZE);\n"
|
"\ttypelib = g_typelib_new_from_const_memory (_G_TYPELIB, _G_TYPELIB_SIZE);\n"
|
||||||
"\tg_irepository_register (NULL, typelib);\n"
|
"\tg_irepository_load_typelib (NULL, typelib, NULL);\n"
|
||||||
"}\n\n");
|
"}\n\n");
|
||||||
|
|
||||||
g_string_append_printf (result,
|
g_string_append_printf (result,
|
||||||
@ -204,6 +205,12 @@ main (int argc, char ** argv)
|
|||||||
g_debug ("[parsing] start, %d includes",
|
g_debug ("[parsing] start, %d includes",
|
||||||
includedirs ? g_strv_length (includedirs) : 0);
|
includedirs ? g_strv_length (includedirs) : 0);
|
||||||
|
|
||||||
|
g_type_init ();
|
||||||
|
|
||||||
|
if (includedirs != NULL)
|
||||||
|
for (i = 0; includedirs[i]; i++)
|
||||||
|
g_irepository_prepend_search_path (includedirs[i]);
|
||||||
|
|
||||||
modules = NULL;
|
modules = NULL;
|
||||||
for (i = 0; input[i]; i++)
|
for (i = 0; input[i]; i++)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user