Commit e221dec8 authored by Philip Withnall's avatar Philip Withnall

Move the folks-telepathy library to a "lib" subdir of backends/telepathy

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
parent 870ffaab
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,142 +10,12 @@ 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
......
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
......@@ -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
])
......
......@@ -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)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment