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



commit e221dec87f9092b526a1d87b285b127c5a2c4ca2
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Thu Aug 26 12:37:15 2010 +0100

    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

 backends/telepathy/Makefile.am                     |  173 +-----------------
 backends/telepathy/lib/Makefile.am                 |  184 ++++++++++++++++++++
 .../{ => lib}/folks-telepathy-uninstalled.pc.in    |    0
 backends/telepathy/{ => lib}/folks-telepathy.deps  |    0
 backends/telepathy/{ => lib}/folks-telepathy.pc.in |    0
 backends/telepathy/{ => lib}/tp-lowlevel.c         |    0
 backends/telepathy/{ => lib}/tp-lowlevel.h         |    0
 backends/telepathy/{ => lib}/tpf-logger.vala       |    0
 .../telepathy/{ => lib}/tpf-persona-store.vala     |    0
 backends/telepathy/{ => lib}/tpf-persona.vala      |    0
 configure.ac                                       |    5 +-
 docs/Makefile.am                                   |    6 +-
 12 files changed, 201 insertions(+), 167 deletions(-)
---
diff --git a/backends/telepathy/Makefile.am b/backends/telepathy/Makefile.am
index 09cadcc..fd09507 100644
--- a/backends/telepathy/Makefile.am
+++ b/backends/telepathy/Makefile.am
@@ -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
index 0000000..c7a57e6
--- /dev/null
+++ b/backends/telepathy/lib/Makefile.am
@@ -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
diff --git a/backends/telepathy/folks-telepathy-uninstalled.pc.in b/backends/telepathy/lib/folks-telepathy-uninstalled.pc.in
similarity index 100%
rename from backends/telepathy/folks-telepathy-uninstalled.pc.in
rename to backends/telepathy/lib/folks-telepathy-uninstalled.pc.in
diff --git a/backends/telepathy/folks-telepathy.deps b/backends/telepathy/lib/folks-telepathy.deps
similarity index 100%
rename from backends/telepathy/folks-telepathy.deps
rename to backends/telepathy/lib/folks-telepathy.deps
diff --git a/backends/telepathy/folks-telepathy.pc.in b/backends/telepathy/lib/folks-telepathy.pc.in
similarity index 100%
rename from backends/telepathy/folks-telepathy.pc.in
rename to backends/telepathy/lib/folks-telepathy.pc.in
diff --git a/backends/telepathy/tp-lowlevel.c b/backends/telepathy/lib/tp-lowlevel.c
similarity index 100%
rename from backends/telepathy/tp-lowlevel.c
rename to backends/telepathy/lib/tp-lowlevel.c
diff --git a/backends/telepathy/tp-lowlevel.h b/backends/telepathy/lib/tp-lowlevel.h
similarity index 100%
rename from backends/telepathy/tp-lowlevel.h
rename to backends/telepathy/lib/tp-lowlevel.h
diff --git a/backends/telepathy/tpf-logger.vala b/backends/telepathy/lib/tpf-logger.vala
similarity index 100%
rename from backends/telepathy/tpf-logger.vala
rename to backends/telepathy/lib/tpf-logger.vala
diff --git a/backends/telepathy/tpf-persona-store.vala b/backends/telepathy/lib/tpf-persona-store.vala
similarity index 100%
rename from backends/telepathy/tpf-persona-store.vala
rename to backends/telepathy/lib/tpf-persona-store.vala
diff --git a/backends/telepathy/tpf-persona.vala b/backends/telepathy/lib/tpf-persona.vala
similarity index 100%
rename from backends/telepathy/tpf-persona.vala
rename to backends/telepathy/lib/tpf-persona.vala
diff --git a/configure.ac b/configure.ac
index cf664e4..4d6e10a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
 ])
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 3366215..693b44c 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -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)))
 



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