[folks] build: Allow backend libraries to have separate LT versions from libfolks.so
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] build: Allow backend libraries to have separate LT versions from libfolks.so
- Date: Mon, 9 Dec 2013 11:04:17 +0000 (UTC)
commit 25996628d86d93dca1dc6300aa6b69a8d86dd4b7
Author: Philip Withnall <philip withnall collabora co uk>
Date: Thu Nov 7 13:51:15 2013 +0000
build: Allow backend libraries to have separate LT versions from libfolks.so
With the addition of the dummy backend, backend libraries (such as
libfolks-dummy.so) no longer necessarily have the same stability guarantees
as the core of libfolks. Consequently, they must have separate LT versions.
These versions will be incremented in-line with the core LT version, but
may also be incremented separately. They don’t affect whether libfolks will
load a given backend module (that’s predicated on the core LT current
version); merely whether client code needs to be re-linked against a given
backend library due to an ABI-incompatible change in its backend-specific
API.
https://bugzilla.gnome.org/show_bug.cgi?id=711544
backends/eds/lib/Makefile.am | 2 +-
backends/libsocialweb/lib/Makefile.am | 2 +-
backends/telepathy/lib/Makefile.am | 2 +-
backends/tracker/lib/Makefile.am | 2 +-
configure.ac | 58 ++++++++++++++++++++++++++++++---
5 files changed, 57 insertions(+), 9 deletions(-)
---
diff --git a/backends/eds/lib/Makefile.am b/backends/eds/lib/Makefile.am
index 2a846d8..eb0038d 100644
--- a/backends/eds/lib/Makefile.am
+++ b/backends/eds/lib/Makefile.am
@@ -89,7 +89,7 @@ libfolks_eds_la_LIBADD = \
libfolks_eds_la_LDFLAGS = \
$(AM_LDFLAGS) \
$(CODE_COVERAGE_LDFLAGS) \
- -version-info "$(LT_CURRENT)":"$(LT_REVISION)":"$(LT_AGE)" \
+ -version-info "$(FOLKS_EDS_LT_VERSION)" \
-export-symbols-regex "^(EDSF|edsf)_.*|" \
$(NULL)
diff --git a/backends/libsocialweb/lib/Makefile.am b/backends/libsocialweb/lib/Makefile.am
index bff4dde..57cf8c4 100644
--- a/backends/libsocialweb/lib/Makefile.am
+++ b/backends/libsocialweb/lib/Makefile.am
@@ -77,7 +77,7 @@ libfolks_libsocialweb_la_LIBADD = \
libfolks_libsocialweb_la_LDFLAGS = \
$(CODE_COVERAGE_LDFLAGS) \
- -version-info "$(LT_CURRENT)":"$(LT_REVISION)":"$(LT_AGE)" \
+ -version-info "$(FOLKS_LIBSOCIALWEB_LT_VERSION)" \
-export-symbols-regex "^swf_.*" \
$(NULL)
diff --git a/backends/telepathy/lib/Makefile.am b/backends/telepathy/lib/Makefile.am
index fab531c..f4d12bb 100644
--- a/backends/telepathy/lib/Makefile.am
+++ b/backends/telepathy/lib/Makefile.am
@@ -277,7 +277,7 @@ endif
libfolks_telepathy_la_LDFLAGS = \
$(AM_LDFLAGS) \
$(CODE_COVERAGE_LDFLAGS) \
- -version-info "$(LT_CURRENT)":"$(LT_REVISION)":"$(LT_AGE)" \
+ -version-info "$(FOLKS_TELEPATHY_LT_VERSION)" \
-export-symbols-regex "^tpf_.*" \
$(NULL)
diff --git a/backends/tracker/lib/Makefile.am b/backends/tracker/lib/Makefile.am
index aab9400..7b98f8d 100644
--- a/backends/tracker/lib/Makefile.am
+++ b/backends/tracker/lib/Makefile.am
@@ -69,7 +69,7 @@ libfolks_tracker_la_LIBADD = \
libfolks_tracker_la_LDFLAGS = \
$(AM_LDFLAGS) \
$(CODE_COVERAGE_LDFLAGS) \
- -version-info "$(LT_CURRENT)":"$(LT_REVISION)":"$(LT_AGE)" \
+ -version-info "$(FOLKS_TRACKER_LT_VERSION)" \
-export-symbols-regex "^(TRF|trf)_.*|" \
$(NULL)
diff --git a/configure.ac b/configure.ac
index 6dd5fbc..bb2e7ba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,15 +6,49 @@ m4_define([folks_minor_version], [9])
m4_define([folks_micro_version], [7])
m4_define([folks_nano_version], [0])
-# If library source has changed since last release, increment revision
-# If public symbols have been added, removed or changed since last release,
-# increment current and set revision to 0
-# If public symbols have been added since last release, increment age
-# If public symbols have been removed since last release, set age to 0
+# Core library LT version. When updating this, don't forget to bump the backend
+# library LT versions too, below.
+#
+# To update the version, follow these instructions sequentially:
+#
+# 1. If the library source code has changed at all since the last update, then
+# increment revision (‘c:r:a’ becomes ‘c:r+1:a’).
+# 2. If any interfaces have been added, removed, or changed since the last
+# update, increment current, and set revision to 0.
+# 3. If any interfaces have been added since the last public release, then
+# increment age.
+# 4. If any interfaces have been removed or changed since the last public
+# release, then set age to 0.
+#
+# The LT current version number is additionally used as libfolks' module API
+# version number: a given libfolks.so will only load modules which were compiled
+# against a core with the same LT current number as itself. This allows the API
+# which is exposed to the modules to be changed.
m4_define([folks_lt_current], [41])
m4_define([folks_lt_revision], [1])
m4_define([folks_lt_age], [16])
+# Each of the backend libraries (e.g. libfolks-eds.so; *not* the loadable
+# modules, eds.so) has its own LT version. These should be incremented when the
+# core folks_lt_* variables are incremented (as all the backend libraries are
+# binary-dependent on libfolks.so), but should also be incremented when
+# incompatible changes are made in the backend library APIs themselves.
+m4_define([folks_eds_lt_current], [41])
+m4_define([folks_eds_lt_revision], [1])
+m4_define([folks_eds_lt_age], [16])
+
+m4_define([folks_libsocialweb_lt_current], [41])
+m4_define([folks_libsocialweb_lt_revision], [1])
+m4_define([folks_libsocialweb_lt_age], [16])
+
+m4_define([folks_telepathy_lt_current], [41])
+m4_define([folks_telepathy_lt_revision], [1])
+m4_define([folks_telepathy_lt_age], [16])
+
+m4_define([folks_tracker_lt_current], [41])
+m4_define([folks_tracker_lt_revision], [1])
+m4_define([folks_tracker_lt_age], [16])
+
# Display the nano_version only if it's not '0'
m4_define([folks_base_version],
folks_major_version.folks_minor_version.folks_micro_version)
@@ -56,6 +90,7 @@ AC_SUBST([CFLAGS])
AC_SUBST([CPPFLAGS])
AC_SUBST([LDFLAGS])
+# Core library LT version
LT_CURRENT=folks_lt_current
LT_REVISION=folks_lt_revision
LT_AGE=folks_lt_age
@@ -63,7 +98,20 @@ AC_SUBST([LT_CURRENT])
AC_SUBST([LT_REVISION])
AC_SUBST([LT_AGE])
+# Backend library LT versions
+FOLKS_EDS_LT_VERSION=folks_eds_lt_current:folks_eds_lt_revision:folks_eds_lt_age
+AC_SUBST([FOLKS_EDS_LT_VERSION])
+
+FOLKS_LIBSOCIALWEB_LT_VERSION=folks_libsocialweb_lt_current:folks_libsocialweb_lt_revision:folks_libsocialweb_lt_age
+AC_SUBST([FOLKS_LIBSOCIALWEB_LT_VERSION])
+
+FOLKS_TELEPATHY_LT_VERSION=folks_telepathy_lt_current:folks_telepathy_lt_revision:folks_telepathy_lt_age
+AC_SUBST([FOLKS_TELEPATHY_LT_VERSION])
+
+FOLKS_TRACKER_LT_VERSION=folks_tracker_lt_current:folks_tracker_lt_revision:folks_tracker_lt_age
+AC_SUBST([FOLKS_TRACKER_LT_VERSION])
+# Core library API version (potentially used for parallel installation)
API_VERSION_MAJOR=0
AC_SUBST([API_VERSION_MAJOR])
API_VERSION_MINOR=6
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]