[nautilus] Add introspection support for libnautilus-extension



commit f1148c5878e8b68c95dad8dec50aa30c6ee9b2d3
Author: Rodrigo Moya <rodrigo gnome-db org>
Date:   Wed May 19 17:01:14 2010 +0200

    Add introspection support for libnautilus-extension

 libnautilus-extension/Makefile.am |   49 ++++++++++++++++---------------------
 1 files changed, 21 insertions(+), 28 deletions(-)
---
diff --git a/libnautilus-extension/Makefile.am b/libnautilus-extension/Makefile.am
index a231583..39ae454 100644
--- a/libnautilus-extension/Makefile.am
+++ b/libnautilus-extension/Makefile.am
@@ -1,3 +1,5 @@
+CLEANFILES = $(NULL)
+
 include $(top_srcdir)/Makefile.shared
 
 lib_LTLIBRARIES=libnautilus-extension.la
@@ -56,36 +58,27 @@ EXTRA_DIST = \
 	libnautilus-extension.pc.in \
 	$(NULL)
 
-if HAVE_INTROSPECTION
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
 
-BUILT_SOURCES = Nautilus-2.0.gir Nautilus-2.0.typelib
+if HAVE_INTROSPECTION
+introspection_files =					\
+	$(libnautilus_extension_include_HEADERS)	\
+	$(libnautilus_extension_la_SOURCES)
+Nautilus-2.0.gir: libnautilus-extension.la Makefile
+Nautilus_2_0_gir_INCLUDES = Gtk-2.0 Gio-2.0 GLib-2.0
+Nautilus_2_0_gir_CFLAGS = -I$(top_srcdir) -I$(top_builddir)
+Nautilus_2_0_gir_LIBS = libnautilus-extension.la
+Nautilus_2_0_gir_FILES = $(addprefix $(srcdir)/, $(introspection_files))
+INTROSPECTION_GIRS += Nautilus-2.0.gir
 
-girdir = $(datadir)/gir-1.0
-gir_DATA = Nautilus-2.0.gir
+girdir = $(datadir)/gir-1.0/
+gir_DATA = $(INTROSPECTION_GIRS)
 
 typelibsdir = $(libdir)/girepository-1.0/
-typelibs_DATA = Nautilus-2.0.typelib
-
-Nautilus-2.0.gir: libnautilus-extension.la
-	$(INTROSPECTION_SCANNER) -v \
-	--namespace Nautilus --nsversion=2.0 \
-	--add-include-path=$(srcdir) \
-	--add-include-path=. \
-	--include=Gio-2.0 \
-	--include=GLib-2.0 \
-	--library=nautilus-extension \
-	--pkg gio-2.0 \
-	--pkg glib-2.0 \
-	--output $@ \
-	-I$(top_srcdir) \
-	$(libnautilus_extension_include_HEADERS) \
-	$(libnautilus_extension_la_SOURCES)
-
-Nautilus-2.0.typelib: Nautilus-2.0.gir
-	LD_LIBRARY_PATH=.libs$${LD_LIBRARY_PATH:+:$$LD_LIBRARY_PATH} \
-	$(INTROSPECTION_COMPILER) \
-	--includedir=$(srcdir) \
-	--includedir=. \
-	$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
+typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
 
-endif
\ No newline at end of file
+CLEANFILES += $(gir_DATA) $(typelibs_DATA)
+endif



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]