[folks] Build tp-lowlevel via gobject-introspection
- From: Travis Reitter <treitter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Build tp-lowlevel via gobject-introspection
- Date: Tue, 17 Aug 2010 23:56:26 +0000 (UTC)
commit a3568cd62fa41b0c133f09ea9444fe068ccc9865
Author: Travis Reitter <travis reitter collabora co uk>
Date: Tue Aug 17 16:31:07 2010 -0700
Build tp-lowlevel via gobject-introspection
Makefile.am | 5 ++-
backends/telepathy/Makefile.am | 43 ++++++++++++++++++-------------
backends/telepathy/tp-lowlevel.metadata | 11 --------
configure.ac | 11 ++------
4 files changed, 31 insertions(+), 39 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 2873ff1..f673e7c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,5 @@
+ACLOCAL_AMFLAGS = -I m4
+
SUBDIRS = \
folks \
backends \
@@ -7,12 +9,11 @@ if ENABLE_DOCS
SUBDIRS += docs
endif
-ACLOCAL_AMFLAGS = -I m4
-
DISTCHECK_CONFIGURE_FLAGS = --enable-docs
EXTRA_DIST = \
autogen.sh \
+ m4/introspection.m4 \
telepathy-check.vala \
$(NULL)
diff --git a/backends/telepathy/Makefile.am b/backends/telepathy/Makefile.am
index fdc6935..42a867f 100644
--- a/backends/telepathy/Makefile.am
+++ b/backends/telepathy/Makefile.am
@@ -43,23 +43,31 @@ libtp_lowlevel_la_LDFLAGS = \
$(TP_GLIB_LIBS) \
$(NULL)
-tp-lowlevel.gi: $(libtp-lowlevel_la_SOURCES) libtp-lowlevel.la
- $(AM_V_GEN)$(VALA_GEN_INTROSPECT) --namespace=Folks \
- $(srcdir)/tp-lowlevel.h \
- $(GLIB_CFLAGS) $(DBUS_GLIB_CFLAGS) $(GEE_CFLAGS) \
- $(TP_GLIB_CFLAGS) -I$(top_srcdir)/folks \
- .libs/libtp-lowlevel.so > tp-lowlevel.gi
-
-# copy the metadata file as necessary, to work around gnome bug #624278
-tp-lowlevel.vapi: tp-lowlevel.gi tp-lowlevel.metadata
- test -e tp-lowlevel.metadata || \
- (cp $(srcdir)/tp-lowlevel.metadata . && \
- touch tp-lowlevel.metadata.copied)
+DISTCHECK_CONFIGURE_FLAGS = --enable-introspection
+
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+CLEANFILES =
+
+if HAVE_INTROSPECTION
+tp-lowlevel.gir: libtp-lowlevel.la
+tp_lowlevel_gir_INCLUDES = GObject-2.0 Gee-1.0 TelepathyGLib-0.12
+tp_lowlevel_gir_CFLAGS = $(TP_GLIB_CFLAGS)
+tp_lowlevel_gir_LIBS = libtp-lowlevel.la
+tp_lowlevel_gir_FILES = $(libtp_lowlevel_la_SOURCES)
+tp_lowlevel_gir_NAMESPACE = Folks
+INTROSPECTION_GIRS += tp-lowlevel.gir
+
+CLEANFILES += $(gir_DATA) $(typelib_DATA)
+endif
+
+tp-lowlevel.vapi: tp-lowlevel.gir
$(AM_V_GEN)$(VAPIGEN) $(VALAFLAGS) --library tp-lowlevel \
- --metadata=tp-lowlevel.metadata --pkg gio-2.0 \
+ --pkg gio-2.0 \
--pkg telepathy-glib \
- tp-lowlevel.gi
- test ! -e tp-lowlevel.metadata.copied || rm -f tp-lowlevel.metadata*
+ tp-lowlevel.gir
internal_vapi_files = \
tp-lowlevel.vapi \
@@ -208,7 +216,7 @@ BUILT_SOURCES = \
folks-backend-telepathy.h \
folks-backend-telepathy.vala.stamp \
folks-backend-telepathy.vapi \
- tp-lowlevel.gi \
+ tp-lowlevel.gir \
tp-lowlevel.vapi \
$(folks_telepathy_valasources:.vala=.c) \
$(libfolks_backend_telepathy_la_SOURCES) \
@@ -216,13 +224,12 @@ BUILT_SOURCES = \
folks-telepathy-uninstalled.pc \
$(NULL)
-CLEANFILES = $(BUILT_SOURCES)
+CLEANFILES += $(BUILT_SOURCES)
EXTRA_DIST = \
$(folks_telepathy_valasources) \
$(folks_backend_telepathy_valasources) \
$(libtp_lowlevel_la_SOURCES) \
- tp-lowlevel.metadata \
$(pkgconfig_in) \
folks-telepathy.vala.stamp \
folks-telepathy.vapi \
diff --git a/configure.ac b/configure.ac
index 5fb03ce..c45220f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -96,14 +96,9 @@ AC_SUBST(VAPIDIR)
AC_PATH_PROG(VAPIGEN, vapigen, vapigen)
AC_SUBST(VAPIGEN)
-# XXX: using this path instead of the wrapper script vala-gen-introspect is
-# sub-optimal, but the wrapper requires that we use a pkg-config file. Once
-# the dependencies of bgo#627046 are fixed, we should use g-ir-scanner instead
-# of vala-gen-introspect anyway.
-VALA_GEN_INTROSPECT='$(libdir)/vala-0.10/gen-introspect-0.10'
-AC_SUBST(VALA_GEN_INTROSPECT)
-
-AS_IF([test "$VAPIGEN" = "" -o "$VALA_GEN_INTROSPECT" = ""],
+GOBJECT_INTROSPECTION_CHECK([0.6.7])
+
+AS_IF([test "$VAPIGEN" = ""],
[AC_MSG_ERROR([Vala must be built with --enable-vapigen])])
PKG_CHECK_MODULES(GEE, gee-1.0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]