[goocanvas/introspection: 2/8] Build GObject Introspection files.



commit 65d5ff967240f5f4c92455514cd1590bb00ede09
Author: Tristan Brindle <t c brindle gmail com>
Date:   Tue May 17 20:29:42 2011 +0800

    Build GObject Introspection files.
    
    This is a hard build-time dependency on GI, which may or may not be desired...

 Makefile.am     |    2 ++
 configure.in    |    2 ++
 src/Makefile.am |   26 ++++++++++++++++++++++++++
 3 files changed, 30 insertions(+), 0 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index ebf1ef7..0e7993c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,6 +5,8 @@ SUBDIRS = src demo docs po
 # require automake 1.7
 AUTOMAKE_OPTIONS = 1.7
 
+DISTCHECK_CONFIGURE_FLAGS = --enable-introspection
+
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = goocanvas-2.0.pc
 
diff --git a/configure.in b/configure.in
index fa9cb0d..91034e9 100644
--- a/configure.in
+++ b/configure.in
@@ -47,6 +47,8 @@ AC_SUBST(GLIB_GENMARSHAL)
 GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
 AC_SUBST(GLIB_MKENUMS)
 
+GOBJECT_INTROSPECTION_CHECK([0.6.7])
+
 AC_ARG_ENABLE(rebuilds,
               [AC_HELP_STRING([--disable-rebuilds],
                               [disable all source autogeneration rules])],,
diff --git a/src/Makefile.am b/src/Makefile.am
index 4abd1e2..c08e2ec 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -145,3 +145,29 @@ CLEANFILES = $(gen_sources)
 BUILT_SOURCES = $(libgoocanvas_built_headers) $(libgoocanvas_built_sources)
 MAINTAINERCLEANFILES = $(BUILT_SOURCES) $(stamp_files)
 EXTRA_DIST = $(BUILT_SOURCES) $(libgoocanvas_extra_sources)
+
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+
+if HAVE_INTROSPECTION
+introspection_sources = $(libgoocanvas_2_0_la_SOURCES) $(libgoocanvas_public_headers)
+
+GooCanvas-2.0.gir: libgoocanvas-2.0.la
+GooCanvas_2_0_gir_SCANNERFLAGS = --identifier-prefix=Goo --warn-all
+GooCanvas_2_0_gir_INCLUDES = Gtk-3.0
+GooCanvas_2_0_gir_CFLAGS = $(INCLUDES)
+GooCanvas_2_0_gir_LIBS = goocanvas-2.0
+GooCanvas_2_0_gir_FILES = $(introspection_sources)
+INTROSPECTION_GIRS += GooCanvas-2.0.gir
+
+girdir = $(datadir)/gir-1.0
+gir_DATA = $(INTROSPECTION_GIRS)
+
+typelibdir = $(libdir)/girepository-1.0
+typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+
+CLEANFILES += $(gir_DATA) $(typelib_DATA)
+endif
+



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