[glib] Implement lazy loading of fam plugin
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glib] Implement lazy loading of fam plugin
- Date: Tue, 12 Jan 2010 15:34:55 +0000 (UTC)
commit 74ad124cfba3278c385d177a527f19574fda9670
Author: Alexander Larsson <alexl redhat com>
Date: Tue Jan 12 13:09:10 2010 +0100
Implement lazy loading of fam plugin
gio/fam/Makefile.am | 15 ++++++++++++++-
gio/fam/fam-module.c | 11 +++++++++++
2 files changed, 25 insertions(+), 1 deletions(-)
---
diff --git a/gio/fam/Makefile.am b/gio/fam/Makefile.am
index 29ae072..e4183bd 100644
--- a/gio/fam/Makefile.am
+++ b/gio/fam/Makefile.am
@@ -2,7 +2,7 @@ include $(top_srcdir)/Makefile.decl
NULL =
-module_flags = -export_dynamic -avoid-version -module -no-undefined -export-symbols-regex '^g_io_module_(load|unload)'
+module_flags = -export_dynamic -avoid-version -module -no-undefined -export-symbols-regex '^g_io_module_(load|unload|query)'
giomodule_LTLIBRARIES = libgiofam.la
giomoduledir = $(GIO_MODULE_DIR)
@@ -37,3 +37,16 @@ libgiofam_la_LIBADD = \
$(FAM_LIBS) \
$(NULL)
+if CROSS_COMPILING
+RUN_QUERY_MODULES=false
+else
+RUN_QUERY_MODULES=true
+endif
+
+install-data-hook:
+ if $(RUN_QUERY_MODULES) && test -z "$(DESTDIR)" ; then \
+ $(top_builddir)/gio/gio-querymodules$(EXEEXT) $(DESTDIR)$(GIO_MODULE_DIR) ; \
+ fi
+
+uninstall-local:
+ $(RM) $(DESTDIR)$(GIO_MODULE_DIR)/giomodules.cache
diff --git a/gio/fam/fam-module.c b/gio/fam/fam-module.c
index 70e8dea..91d6d62 100644
--- a/gio/fam/fam-module.c
+++ b/gio/fam/fam-module.c
@@ -41,3 +41,14 @@ g_io_module_unload (GIOModule *module)
_fam_sub_shutdown ();
}
+char **
+g_io_module_query (void)
+{
+ char *eps[] = {
+ G_LOCAL_DIRECTORY_MONITOR_EXTENSION_POINT_NAME,
+ G_LOCAL_FILE_MONITOR_EXTENSION_POINT_NAME,
+ NULL
+ };
+ return g_strdupv (eps);
+}
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]