[libwnck] [all] Add gobject-introspection support
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libwnck] [all] Add gobject-introspection support
- Date: Mon, 8 Mar 2010 14:24:30 +0000 (UTC)
commit eeadbe19d6cc63cbb5ba444608d7826cb6059361
Author: Vincent Untz <vuntz gnome org>
Date: Mon Mar 8 15:24:10 2010 +0100
[all] Add gobject-introspection support
Makefile.am | 2 +-
autogen.sh | 1 +
configure.in | 4 +++
libwnck/Makefile.am | 53 +++++++++++++++++++++++++++++++++++++++++---------
4 files changed, 49 insertions(+), 11 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index e8f32db..a4f0271 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,7 +5,7 @@ ACLOCAL_AMFLAGS = -I m4
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libwnck-1.0.pc
-DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection
EXTRA_DIST = \
MAINTAINERS \
diff --git a/autogen.sh b/autogen.sh
index 6926aeb..01f521f 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -6,6 +6,7 @@ test -z "$srcdir" && srcdir=.
PKG_NAME="libwnck"
REQUIRED_AUTOMAKE_VERSION=1.9
+REQUIRED_M4MACROS=introspection.m4
(test -f $srcdir/configure.in \
&& test -f $srcdir/libwnck/libwnck.h) || {
diff --git a/configure.in b/configure.in
index b8c237c..f46a662 100644
--- a/configure.in
+++ b/configure.in
@@ -1,3 +1,5 @@
+AC_PREREQ(2.62)
+
AC_INIT([libwnck], [2.29.92],
[http://bugzilla.gnome.org/enter_bug.cgi?product=libwnck])
@@ -160,6 +162,8 @@ ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
##################################################
GTK_DOC_CHECK([1.9])
+GOBJECT_INTROSPECTION_CHECK([0.6.7])
+
AC_OUTPUT([
Makefile
doc/Makefile
diff --git a/libwnck/Makefile.am b/libwnck/Makefile.am
index 1d3c0d8..018ecb5 100644
--- a/libwnck/Makefile.am
+++ b/libwnck/Makefile.am
@@ -27,6 +27,19 @@ libwnckinclude_HEADERS= \
wnck_built_headers = $(wnck_built_installed_headers) wnck-marshal.h
wnck_built_cfiles = wnck-enum-types.c wnck-marshal.c
+# Sources that are relevant for introspection
+wnck_sources = \
+ application.c \
+ class-group.c \
+ pager.c \
+ screen.c \
+ selector.c \
+ tasklist.c \
+ util.c \
+ window.c \
+ window-action-menu.c \
+ workspace.c
+
wnck_accessibility_files = \
pager-accessible.c \
pager-accessible.h \
@@ -40,18 +53,9 @@ wnck_accessibility_files = \
libwnck_1_la_SOURCES= \
$(wnck_built_headers) \
$(wnck_built_cfiles) \
- application.c \
- class-group.c \
+ $(wnck_sources) \
inlinepixbufs.h \
- pager.c \
private.h \
- screen.c \
- selector.c \
- tasklist.c \
- util.c \
- window.c \
- window-action-menu.c \
- workspace.c \
xutils.c \
xutils.h \
$(wnck_accessibility_files)
@@ -160,4 +164,33 @@ EXTRA_DIST= \
wnck-marshal.list \
$(IMAGES)
+# Introspection
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+
+if HAVE_INTROSPECTION
+introspection_sources = $(wnck_sources) $(libwnckinclude_HEADERS)
+
+Wnck-1.0.gir: libwnck-1.la Makefile
+Wnck_1_0_gir_INCLUDES = GObject-2.0 Gtk-2.0
+Wnck_1_0_gir_CFLAGS = \
+ @LIBWNCK_CFLAGS@ @XLIB_CFLAGS@ \
+ -I$(top_srcdir) \
+ -DWNCK_I_KNOW_THIS_IS_UNSTABLE \
+ -DSN_API_NOT_YET_FROZEN=1
+Wnck_1_0_gir_LIBS = libwnck-1.la
+Wnck_1_0_gir_FILES = $(addprefix $(srcdir)/,$(introspection_sources))
+INTROSPECTION_GIRS += Wnck-1.0.gir
+
+girdir = $(datadir)/gir-1.0
+dist_gir_DATA = $(INTROSPECTION_GIRS)
+
+typelibdir = $(libdir)/girepository-1.0
+typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+
+CLEANFILES += $(dist_gir_DATA) $(typelib_DATA)
+endif
+
-include $(top_srcdir)/git.mk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]