From abf9c86431a15345196872909c2027f463e73a55 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 24 Jul 2008 19:20:40 +0000 Subject: [PATCH] Add environment variable G_IREPOSITORY_VERBOSE so we can print out what 2008-07-24 Colin Walters * girepository/girepository.c (g_irepository_register): Add environment variable G_IREPOSITORY_VERBOSE so we can print out what we're doing. * girepository/girepository.c (g_irepository_register_file): Add GError error message to g_debug call. svn path=/trunk/; revision=296 --- Makefile.am | 7 +++---- girepository.c | 7 ++++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile.am b/Makefile.am index 9dd5e547f..79033637f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,7 +4,7 @@ include $(top_srcdir)/gcov.mak INCLUDES = -DGIREPO_DEFAULT_SEARCH_PATH="\"$(libdir)\"" -noinst_LTLIBRARIES = libgirepository.la +lib_LTLIBRARIES = libgirepository.la libgirepository_la_SOURCES = \ girepository.c \ @@ -15,8 +15,7 @@ libgirepository_la_SOURCES = \ libgirepository_la_CPPFLAGS = $(GIREPO_CFLAGS) libgirepository_la_LIBADD = $(GIREPO_LIBS) -#girepodir = $(includedir)/gobject-introspection-1.0/ -#girepo_HEADERS = girepository.h -noinst_HEADERS = girepository.h +girepodir = $(includedir)/gobject-introspection-1.0/ +girepo_HEADERS = girepository.h GCOVSOURCES = $(libgirepository_la_SOURCES) diff --git a/girepository.c b/girepository.c index c2b119cd7..4da5ffc5f 100644 --- a/girepository.c +++ b/girepository.c @@ -114,6 +114,11 @@ g_irepository_register (GIRepository *repository, if (metadata->module == NULL) metadata->module = g_module_open (NULL, 0); + if (g_getenv ("G_IREPOSITORY_VERBOSE")) + { + g_printerr ("Loaded typelib %s\n", name); + } + return name; } @@ -443,7 +448,7 @@ g_irepository_register_file (GIRepository *repository, full_path = g_build_filename (dir, fname, NULL); mfile = g_mapped_file_new (full_path, FALSE, &error1); if (error1) { - g_debug ("Failed to mmap \"%s\"", full_path); + g_debug ("Failed to mmap \"%s\": %s", full_path, error1->message); g_clear_error (&error1); g_free (full_path); continue;