Move the folks-telepathy library to a "lib" subdir of backends/telepathy
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Thu, 26 Aug 2010 11:37:15 +0000 (12:37 +0100)
committerPhilip Withnall <philip.withnall@collabora.co.uk>
Thu, 26 Aug 2010 21:21:49 +0000 (22:21 +0100)
This solves the ordering problem between building folks-telepathy.la and
folks-backend-telepathy.la, where the latter depends on the former, under
parallel installation. See
http://old.nabble.com/relinking-error-td27796838.html for an explanation of
why adding DEPENDENCIES doesn't work.

This fixes parallel installation of libfolks. Closes: bgo#627898

12 files changed:
backends/telepathy/Makefile.am
backends/telepathy/lib/Makefile.am [new file with mode: 0644]
backends/telepathy/lib/folks-telepathy-uninstalled.pc.in [moved from backends/telepathy/folks-telepathy-uninstalled.pc.in with 100% similarity]
backends/telepathy/lib/folks-telepathy.deps [moved from backends/telepathy/folks-telepathy.deps with 100% similarity]
backends/telepathy/lib/folks-telepathy.pc.in [moved from backends/telepathy/folks-telepathy.pc.in with 100% similarity]
backends/telepathy/lib/tp-lowlevel.c [moved from backends/telepathy/tp-lowlevel.c with 100% similarity]
backends/telepathy/lib/tp-lowlevel.h [moved from backends/telepathy/tp-lowlevel.h with 100% similarity]
backends/telepathy/lib/tpf-logger.vala [moved from backends/telepathy/tpf-logger.vala with 100% similarity]
backends/telepathy/lib/tpf-persona-store.vala [moved from backends/telepathy/tpf-persona-store.vala with 100% similarity]
backends/telepathy/lib/tpf-persona.vala [moved from backends/telepathy/tpf-persona.vala with 100% similarity]
configure.ac
docs/Makefile.am

index 09cadcc..fd09507 100644 (file)
@@ -1,5 +1,8 @@
+SUBDIRS = lib
+
 AM_CPPFLAGS = \
        -I$(top_srcdir)/folks \
+       -I$(top_srcdir)/backends/telepathy/lib \
        -include $(CONFIG_HEADER) \
        -DPACKAGE_DATADIR=\"$(pkgdatadir)\" \
        -DG_LOG_DOMAIN=\"TelepathyBackend\" \
@@ -7,143 +10,13 @@ AM_CPPFLAGS = \
 
 VALAFLAGS += \
        --vapidir=. \
+       --vapidir=$(top_builddir)/backends/telepathy/lib \
        --vapidir=$(top_srcdir)/folks
 
-noinst_LTLIBRARIES = libtp-lowlevel.la
-folks_telepathydir = $(libdir)
-folks_telepathy_LTLIBRARIES = libfolks-telepathy.la
 backenddir = $(BACKEND_DIR)/telepathy
 backend_LTLIBRARIES = libfolks-backend-telepathy.la
 
 ##################################################################
-# Telepathy Lowlevel library
-##################################################################
-
-libtp_lowlevel_la_SOURCES = \
-       tp-lowlevel.c \
-       tp-lowlevel.h \
-       $(NULL)
-
-libtp_lowlevel_la_CPPFLAGS = \
-       $(GIO_CFLAGS) \
-       $(GLIB_CFLAGS) \
-       $(GEE_CFLAGS) \
-       $(TP_GLIB_CFLAGS) \
-       $(AM_CPPFLAGS) \
-       $(NULL)
-
-# the -shared and -rpath arguments are to force it to be compiled to a .so,
-# despite not being installed (it needs to be a shared library for
-# vala-gen-introspect)
-libtp_lowlevel_la_LDFLAGS = \
-       -shared -rpath $(libdir) \
-       -avoid-version \
-       $(GIO_LIBS) \
-       $(GLIB_LIBS) \
-       $(TP_GLIB_LIBS) \
-       $(NULL)
-
-DISTCHECK_CONFIGURE_FLAGS = --enable-introspection
-
--include $(INTROSPECTION_MAKEFILE)
-INTROSPECTION_GIRS =
-INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
-INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
-CLEANFILES =
-
-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)
-
-tp-lowlevel.vapi: tp-lowlevel.gir
-       $(AM_V_GEN)$(VAPIGEN) $(VALAFLAGS) --library tp-lowlevel \
-               --pkg gio-2.0 \
-               --pkg telepathy-glib \
-               tp-lowlevel.gir
-
-internal_vapi_files = \
-       tp-lowlevel.vapi \
-       $(NULL)
-
-##################################################################
-# Support library
-##################################################################
-
-pkgconfig_in = folks-telepathy.pc.in
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = $(pkgconfig_in:.in=)
-
-folks_telepathy_valasources = \
-       tpf-persona.vala \
-       tpf-persona-store.vala \
-       tpf-logger.vala \
-       $(NULL)
-
-folks_telepathy_deps = \
-       folks \
-       tp-lowlevel \
-       gobject-2.0 \
-       gio-2.0 \
-       gee-1.0 \
-       dbus-glib-1 \
-       telepathy-glib \
-       $(NULL)
-
-libfolks_telepathy_la_SOURCES = \
-       $(folks_telepathy_valasources:.vala=.c) \
-       $(libtp_lowlevel_la_SOURCES) \
-       $(NULL)
-
-libfolks_telepathy_la_CPPFLAGS = \
-       $(GIO_CFLAGS) \
-       $(GLIB_CFLAGS) \
-       $(DBUS_GLIB_CFLAGS) \
-       $(GEE_CFLAGS) \
-       $(TP_GLIB_CFLAGS) \
-       $(AM_CPPFLAGS) \
-       $(NULL)
-
-libfolks_telepathy_la_LIBADD = \
-       $(GIO_LIBS) \
-       $(GLIB_LIBS) \
-       $(DBUS_GLIB_LIBS) \
-       $(GEE_LIBS) \
-       $(TP_GLIB_LIBS) \
-       $(top_builddir)/folks/libfolks.la \
-       $(NULL)
-
-# The quoting here is unnecessary but harmless, and has the useful side-effect
-# that vim quickfix mode (:make) doesn't interpret the libtool --mode=link
-# command as an error message in a bizarrely named file
-libfolks_telepathy_la_LDFLAGS = \
-       -version-info "$(LT_CURRENT)":"$(LT_REVISION)":"$(LT_AGE)"
-
-folks_telepathy_includedir = $(includedir)/folks
-folks_telepathy_include_HEADERS = \
-       folks-telepathy.h \
-       $(NULL)
-
-folks-telepathy.h $(folks_telepathy_valasources:.vala=.c): folks-telepathy.vala.stamp
-
-folks_telepathy_vapi_deps = \
-       $(folks_telepathy_valasources) \
-       $(internal_vapi_files) \
-       $(NULL)
-
-folks-telepathy.vapi folks-telepathy.vala.stamp: $(folks_telepathy_vapi_deps)
-       $(VALA_V)$(VALAC) $(VALACFLAGS) $(VALAFLAGS) -H folks-telepathy.h -C \
-               --library folks-telepathy \
-               $(addprefix --pkg ,$(folks_telepathy_deps)) \
-               $(addprefix $(srcdir)/,$(folks_telepathy_valasources))
-       touch $@
-
-##################################################################
 # Backend
 ##################################################################
 
@@ -179,23 +52,15 @@ libfolks_backend_telepathy_la_LIBADD = \
        $(DBUS_GLIB_LIBS) \
        $(GEE_LIBS) \
        $(TP_GLIB_LIBS) \
-       -L$(abs_top_srcdir)/backends/telepathy/.libs \
-       libfolks-telepathy.la \
+       lib/libfolks-telepathy.la \
        $(NULL)
 
 libfolks_backend_telepathy_la_LDFLAGS = -shared -fPIC -module -avoid-version
 
 folks-backend-telepathy.h $(libfolks_backend_telepathy_la_SOURCES): \
-               folks-backend-telepathy.vala.stamp
-
-vapi_deps = \
-       folks-telepathy.vapi \
-       libfolks-telepathy.la \
-       $(folks_backend_telepathy_valasources) \
-       $(internal_vapi_files) \
-       $(NULL)
+       folks-backend-telepathy.vala.stamp
 
-folks-backend-telepathy.vapi folks-backend-telepathy.vala.stamp: $(vapi_deps)
+folks-backend-telepathy.vapi folks-backend-telepathy.vala.stamp: $(folks_backend_telepathy_valasources)
        $(VALA_V)$(VALAC) $(VALACFLAGS) $(VALAFLAGS) \
                -H folks-backend-telepathy.h -C \
                --library folks-backend-telepathy \
@@ -208,39 +73,19 @@ folks-backend-telepathy.vapi folks-backend-telepathy.vala.stamp: $(vapi_deps)
 ##################################################################
 
 EXTRA_DIST = \
-       $(folks_telepathy_valasources) \
        $(folks_backend_telepathy_valasources) \
-       $(libtp_lowlevel_la_SOURCES) \
-       $(pkgconfig_in) \
-       folks-telepathy.vala.stamp \
-       folks-telepathy.vapi \
        folks-backend-telepathy.vala.stamp \
        folks-backend-telepathy.vapi \
-       tp-lowlevel.vapi \
        $(NULL)
 
-CLEANFILES += \
-       folks-telepathy.h \
-       folks-telepathy.vala.stamp \
-       folks-telepathy.vapi \
+CLEANFILES = \
        folks-backend-telepathy.h \
        folks-backend-telepathy.vala.stamp \
        folks-backend-telepathy.vapi \
-       tp-lowlevel.gir \
-       tp-lowlevel.vapi \
-       $(folks_telepathy_valasources:.vala=.c) \
        $(libfolks_backend_telepathy_la_SOURCES) \
-       $(pkgconfig_in:.in=) \
-       folks-telepathy-uninstalled.pc \
        $(NULL)
 
-DISTCLEANFILES = \
-       $(NULL)
-
-MAINTAINERCLEANFILES = \
-       $(folks_telepathy_valasources:.vala=.c) \
-       $(libfolks_backend_telepathy_la_SOURCES) \
-       $(NULL)
+MAINTAINERCLEANFILES = $(libfolks_backend_telepathy_la_SOURCES)
 
 # set up the verbosity rules to avoid some build noise
 # XXX: once automake >= 1.11 is common, remove these, push valasources files
diff --git a/backends/telepathy/lib/Makefile.am b/backends/telepathy/lib/Makefile.am
new file mode 100644 (file)
index 0000000..c7a57e6
--- /dev/null
@@ -0,0 +1,184 @@
+AM_CPPFLAGS = \
+       -I$(top_srcdir)/folks \
+       -include $(CONFIG_HEADER) \
+       -DPACKAGE_DATADIR=\"$(pkgdatadir)\" \
+       -DG_LOG_DOMAIN=\"TelepathyBackend\" \
+       $(NULL)
+
+VALAFLAGS += \
+       --vapidir=. \
+       --vapidir=$(top_srcdir)/folks
+
+noinst_LTLIBRARIES = libtp-lowlevel.la
+folks_telepathydir = $(libdir)
+folks_telepathy_LTLIBRARIES = libfolks-telepathy.la
+
+##################################################################
+# Telepathy Lowlevel library
+##################################################################
+
+libtp_lowlevel_la_SOURCES = \
+       tp-lowlevel.c \
+       tp-lowlevel.h \
+       $(NULL)
+
+libtp_lowlevel_la_CPPFLAGS = \
+       $(GIO_CFLAGS) \
+       $(GLIB_CFLAGS) \
+       $(GEE_CFLAGS) \
+       $(TP_GLIB_CFLAGS) \
+       $(AM_CPPFLAGS) \
+       $(NULL)
+
+# the -shared and -rpath arguments are to force it to be compiled to a .so,
+# despite not being installed (it needs to be a shared library for
+# vala-gen-introspect)
+libtp_lowlevel_la_LDFLAGS = \
+       -shared -rpath $(libdir) \
+       -avoid-version \
+       $(GIO_LIBS) \
+       $(GLIB_LIBS) \
+       $(TP_GLIB_LIBS) \
+       $(NULL)
+
+DISTCHECK_CONFIGURE_FLAGS = --enable-introspection
+
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+CLEANFILES =
+
+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)
+
+tp-lowlevel.vapi: tp-lowlevel.gir
+       $(AM_V_GEN)$(VAPIGEN) $(VALAFLAGS) --library tp-lowlevel \
+               --pkg gio-2.0 \
+               --pkg telepathy-glib \
+               tp-lowlevel.gir
+
+internal_vapi_files = \
+       tp-lowlevel.vapi \
+       $(NULL)
+
+##################################################################
+# Support library
+##################################################################
+
+pkgconfig_in = folks-telepathy.pc.in
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = $(pkgconfig_in:.in=)
+
+folks_telepathy_valasources = \
+       tpf-persona.vala \
+       tpf-persona-store.vala \
+       tpf-logger.vala \
+       $(NULL)
+
+folks_telepathy_deps = \
+       folks \
+       tp-lowlevel \
+       gobject-2.0 \
+       gio-2.0 \
+       gee-1.0 \
+       dbus-glib-1 \
+       telepathy-glib \
+       $(NULL)
+
+libfolks_telepathy_la_SOURCES = \
+       $(folks_telepathy_valasources:.vala=.c) \
+       $(libtp_lowlevel_la_SOURCES) \
+       $(NULL)
+
+libfolks_telepathy_la_CPPFLAGS = \
+       $(GIO_CFLAGS) \
+       $(GLIB_CFLAGS) \
+       $(DBUS_GLIB_CFLAGS) \
+       $(GEE_CFLAGS) \
+       $(TP_GLIB_CFLAGS) \
+       $(AM_CPPFLAGS) \
+       $(NULL)
+
+libfolks_telepathy_la_LIBADD = \
+       $(GIO_LIBS) \
+       $(GLIB_LIBS) \
+       $(DBUS_GLIB_LIBS) \
+       $(GEE_LIBS) \
+       $(TP_GLIB_LIBS) \
+       $(top_builddir)/folks/libfolks.la \
+       $(NULL)
+
+# The quoting here is unnecessary but harmless, and has the useful side-effect
+# that vim quickfix mode (:make) doesn't interpret the libtool --mode=link
+# command as an error message in a bizarrely named file
+libfolks_telepathy_la_LDFLAGS = \
+       -version-info "$(LT_CURRENT)":"$(LT_REVISION)":"$(LT_AGE)"
+
+folks_telepathy_includedir = $(includedir)/folks
+folks_telepathy_include_HEADERS = \
+       folks-telepathy.h \
+       $(NULL)
+
+folks-telepathy.h $(folks_telepathy_valasources:.vala=.c): folks-telepathy.vala.stamp
+
+folks_telepathy_vapi_deps = \
+       $(folks_telepathy_valasources) \
+       $(internal_vapi_files) \
+       $(NULL)
+
+folks-telepathy.vapi folks-telepathy.vala.stamp: $(folks_telepathy_vapi_deps)
+       $(VALA_V)$(VALAC) $(VALACFLAGS) $(VALAFLAGS) -H folks-telepathy.h -C \
+               --library folks-telepathy \
+               $(addprefix --pkg ,$(folks_telepathy_deps)) \
+               $(addprefix $(srcdir)/,$(folks_telepathy_valasources))
+       touch $@
+
+##################################################################
+# General
+##################################################################
+
+BUILT_SOURCES = \
+       folks-telepathy.h \
+       folks-telepathy.vala.stamp \
+       folks-telepathy.vapi \
+       tp-lowlevel.gir \
+       tp-lowlevel.vapi \
+       $(folks_telepathy_valasources:.vala=.c) \
+       $(pkgconfig_in:.in=) \
+       folks-telepathy-uninstalled.pc \
+       $(NULL)
+
+CLEANFILES += $(BUILT_SOURCES)
+
+EXTRA_DIST = \
+       $(folks_telepathy_valasources) \
+       $(libtp_lowlevel_la_SOURCES) \
+       $(pkgconfig_in) \
+       folks-telepathy.vala.stamp \
+       folks-telepathy.vapi \
+       tp-lowlevel.vapi \
+       $(NULL)
+
+DISTCLEANFILES = \
+       $(NULL)
+
+MAINTAINERCLEANFILES = \
+       $(folks_telepathy_valasources:.vala=.c) \
+       $(NULL)
+
+# set up the verbosity rules to avoid some build noise
+# XXX: once automake >= 1.11 is common, remove these, push valasources files
+# into SOURCES and add AM_PROG_VALAC to configure.ac
+VALA_V = $(VALA_V_$(V))
+VALA_V_ = $(VALA_V_$(AM_DEFAULT_VERBOSITY))
+VALA_V_0 = @echo "  VALAC " $^;
+
+-include $(top_srcdir)/git.mk
index cf664e4..4d6e10a 100644 (file)
@@ -189,14 +189,15 @@ AC_SUBST(ERROR_CFLAGS)
 # -----------------------------------------------------------
 
 AC_CONFIG_FILES([
-       backends/telepathy/folks-telepathy.pc
-       backends/telepathy/folks-telepathy-uninstalled.pc
+       backends/telepathy/lib/folks-telepathy.pc
+       backends/telepathy/lib/folks-telepathy-uninstalled.pc
        folks/folks.pc
        folks/folks-uninstalled.pc
        Makefile
        backends/Makefile
        backends/key-file/Makefile
        backends/telepathy/Makefile
+       backends/telepathy/lib/Makefile
        folks/Makefile
        docs/Makefile
 ])
index 3366215..693b44c 100644 (file)
@@ -23,13 +23,17 @@ img_DATA = \
 
 $(doc_data) $(innerdoc_DATA) $(img_DATA): folks-0.1/index.html
 
-VALAFLAGS = --vapidir=$(top_srcdir)/folks --vapidir=$(top_srcdir)/backends/telepathy
+VALAFLAGS = \
+       --vapidir=$(top_srcdir)/folks \
+       --vapidir=$(top_srcdir)/backends/telepathy \
+       --vapidir=$(top_srcdir)/backends/telepathy/lib
 VALAFLAGS += $(TP_VALA_VALAFLAGS)
 
 # The Vala files which will have documentation extracted from them
 _doc_files = \
        $(top_srcdir)/folks/*.vala \
        $(top_srcdir)/backends/telepathy/*.vala \
+       $(top_srcdir)/backends/telepathy/lib/*.vala \
        $(top_srcdir)/backends/key-file/*.vala
 doc_files = $(filter-out %-backend-factory.vala,$(wildcard $(_doc_files)))