diff options
author | Colin Walters <walters@src.gnome.org> | 2008-08-30 20:31:07 +0000 |
---|---|---|
committer | Colin Walters <walters@src.gnome.org> | 2008-08-30 20:31:07 +0000 |
commit | 8e9b9ce60747b262e3e9c4be4ae85ee1319ae3f4 (patch) | |
tree | 1ddd59b84d74350c3b3afbf7df2092bfc001f053 /tools/compiler.c | |
parent | 3be5f52707d68d0fb02f4415dc90450aa64ffea1 (diff) | |
download | gobject-introspection-8e9b9ce60747b262e3e9c4be4ae85ee1319ae3f4.tar.gz |
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
Diffstat (limited to 'tools/compiler.c')
-rw-r--r-- | tools/compiler.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/compiler.c b/tools/compiler.c index 68568b60..c2d22482 100644 --- a/tools/compiler.c +++ b/tools/compiler.c @@ -41,6 +41,7 @@ gchar **input = NULL; gchar *output = NULL; gchar *mname = NULL; gchar *shlib = NULL; +gboolean include_cwd = FALSE; gboolean debug = FALSE; gboolean verbose = FALSE; @@ -80,7 +81,7 @@ format_output (GTypelib *typelib) "{\n" "\tGTypelib *typelib;\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"); g_string_append_printf (result, @@ -204,6 +205,12 @@ main (int argc, char ** argv) g_debug ("[parsing] start, %d includes", 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; for (i = 0; input[i]; i++) { |