[vte] Add introspection



commit e1b7915a6cb88da609f2c9a7c754ff75aa260d88
Author: Christian Persch <chpe gnome org>
Date:   Wed Mar 17 21:23:40 2010 +0100

    Add introspection
    
    Based on a patch by Johan Dahlin from bug #604837.

 Makefile.am     |    2 +-
 configure.in    |   11 +++++++++++
 src/Makefile.am |   33 +++++++++++++++++++++++++++++++++
 3 files changed, 45 insertions(+), 1 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index dd622c8..7f4d0cb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,7 +19,7 @@ endif
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = vte.pc
 
-DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --disable-silent-rules
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection --disable-silent-rules
 
 MAINTAINERCLEANFILES = \
 		ChangeLog \
diff --git a/configure.in b/configure.in
index e87023c..96a17a2 100644
--- a/configure.in
+++ b/configure.in
@@ -466,6 +466,17 @@ fi
   
 AM_CONDITIONAL([ENABLE_GLADE_CATALOGUE],[test "$enable_glade_catalogue" = "yes"])
 
+# *************
+# Introspection
+# *************
+
+# No automagic please!
+if test -z "$enable_introspection"; then
+  enable_introspection=no
+fi
+
+GOBJECT_INTROSPECTION_CHECK([0.6.7])
+
 ################################################################################
 
 GTK_DOC_CHECK([1.13],[--flavour no-tmpl])
diff --git a/src/Makefile.am b/src/Makefile.am
index 7f4e6ab..dbbe58d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -151,6 +151,38 @@ vte_SOURCES = vteapp.c
 vte_CFLAGS = $(VTE_CFLAGS)
 vte_LDADD = libvte.la $(VTE_LIBS)
 
+# introspection
+
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+
+if HAVE_INTROSPECTION
+introspection_sources = \
+    vte.c \
+    vte.h \
+    vtepty.h \
+    pty.c \
+    vtetypebuiltins.c \
+    vtetypebuiltins.h
+
+Vte- VTE_API_VERSION@.gir: libvte.la
+Vte_ VTE_API_VERSION@_gir_INCLUDES = Pango-1.0 Gdk-2.0 Gtk-2.0
+Vte_ VTE_API_VERSION@_gir_CFLAGS = $(VTE_CFLAGS) -DVTE_COMPILATION -I$(top_srcdir)
+Vte_ VTE_API_VERSION@_gir_LIBS = libvte.la
+Vte_ VTE_API_VERSION@_gir_FILES = $(addprefix $(srcdir)/,$(introspection_sources))
+
+INTROSPECTION_GIRS += Vte- VTE_API_VERSION@.gir
+
+girdir = $(INTROSPECTION_GIRDIR)
+dist_gir_DATA = $(INTROSPECTION_GIRS)
+
+typelibdir = $(INTROSPECTION_TYPELIBDIR)
+typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+
+CLEANFILES += $(dist_gir_DATA) $(typelib_DATA)
+endif
+
 
 # Misc unit tests and utilities
 
@@ -288,3 +320,4 @@ ssfe_SOURCES = ssfe.c
 xticker_SOURCES = xticker.c
 
 -include $(top_srcdir)/git.mk
+-include $(INTROSPECTION_MAKEFILE)



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