[Tracker] Libtool Library Versioning



Hi all,

I have recently added libtool library versioning to libraries which are not loaded as modules - for the most part this is just src/lib*.

I have included the patch here.

Michael, can you comment if this is not adequate?

--
Regards,
Martyn
Index: src/libtracker/Makefile.am
===================================================================
--- src/libtracker/Makefile.am  (revision 3105)
+++ src/libtracker/Makefile.am  (working copy)
@@ -12,7 +12,10 @@ INCLUDES =                                   \
 lib_LTLIBRARIES = libtrackerclient.la
 
 libtrackerclient_la_SOURCES = tracker.c
-libtrackerclient_la_LDFLAGS = -version-info 0:0:0
+
+libtrackerclient_la_LDFLAGS =                  \
+       -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+
 libtrackerclient_la_LIBADD =                   \
        $(GLIB2_LIBS)                           \
        $(DBUS_LIBS)                            \
Index: src/libtracker-data/Makefile.am
===================================================================
--- src/libtracker-data/Makefile.am     (revision 3105)
+++ src/libtracker-data/Makefile.am     (working copy)
@@ -40,7 +40,9 @@ noinst_HEADERS =                                                      \
        tracker-rdf-query.h                                             \
        tracker-turtle.h                                                
 
-libtracker_data_la_LDFLAGS = -version-info 0:0:0
+libtracker_data_la_LDFLAGS =                                           \
+       -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+
 libtracker_data_la_LIBADD =                                            \
        $(top_builddir)/src/libtracker-common/libtracker-common.la      \
        $(top_builddir)/src/libtracker-db/libtracker-db.la              \
Index: src/libstemmer/Makefile.am
===================================================================
--- src/libstemmer/Makefile.am  (revision 3105)
+++ src/libstemmer/Makefile.am  (working copy)
@@ -50,5 +50,6 @@ noinst_HEADERS =                      \
 
 
 libstemmer_la_LIBADD = $(GCOV_LIBS)
-libstemmer_la_LDFLAGS = -version-info 0:0:0
+libstemmer_la_LDFLAGS =                \
+       -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
 
Index: src/libtracker-db/Makefile.am
===================================================================
--- src/libtracker-db/Makefile.am       (revision 3105)
+++ src/libtracker-db/Makefile.am       (working copy)
@@ -37,7 +37,9 @@ noinst_HEADERS =                                                      \
        tracker-db-interface-sqlite.h                                   \
        tracker-db-manager.h 
 
-libtracker_db_la_LDFLAGS = -version-info 0:0:0
+libtracker_db_la_LDFLAGS =                                             \
+       -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+
 libtracker_db_la_LIBADD =                                              \
        $(top_builddir)/src/libtracker-common/libtracker-common.la      \
        $(SQLITE3_LIBS)                                                 \
Index: src/libtracker-gtk/Makefile.am
===================================================================
--- src/libtracker-gtk/Makefile.am      (revision 3105)
+++ src/libtracker-gtk/Makefile.am      (working copy)
@@ -30,5 +30,5 @@ libtracker_gtk_la_LIBADD =                                    \
        $(LIBTRACKERGTK_LIBS)                                   \
        $(GCOV_LIBS)
 
-libtracker_gtk_la_LDFLAGS = -version-info 0:0:0
-
+libtracker_gtk_la_LDFLAGS =                                    \
+       -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
Index: src/libinotify/Makefile.am
===================================================================
--- src/libinotify/Makefile.am  (revision 3105)
+++ src/libinotify/Makefile.am  (working copy)
@@ -19,7 +19,9 @@ libinotify_la_SOURCES =                               \
        inotify-log.h                                   \
        libinotify.h
 
-libinotify_la_LDFLAGS = -version-info 0:0:0
+libinotify_la_LDFLAGS =                                \
+       -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+
 libinotify_la_LIBADD =                                         \
        $(GLIB2_LIBS)                                   \
        $(GCOV_LIBS)
Index: src/libtracker-common/Makefile.am
===================================================================
--- src/libtracker-common/Makefile.am   (revision 3105)
+++ src/libtracker-common/Makefile.am   (working copy)
@@ -76,7 +76,9 @@ libtracker_commoninclude_HEADERS =                    \
        tracker-type-utils.h                            \
        tracker-utils.h
 
-libtracker_common_la_LDFLAGS = -version-info 0:0:0
+libtracker_common_la_LDFLAGS =                                 \
+       -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+
 libtracker_common_la_LIBADD =                          \
        $(top_builddir)/src/libstemmer/libstemmer.la    \
        $(HAL_LIBS)                                     \
Index: configure.ac
===================================================================
--- configure.ac        (revision 3105)
+++ configure.ac        (working copy)
@@ -22,6 +22,15 @@ m4_define([tracker_version],
 # This is the X.Y used in -llibtracker-FOO-X.Y
 m4_define([tracker_api_version], [0.6])
 
+# libtool version related macros
+m4_define([tracker_lt_release], [tracker_major_version.tracker_minor_version])
+m4_define([tracker_lt_current],
+          [m4_eval(100 * tracker_minor_version + tracker_micro_version - tracker_interface_age)])
+m4_define([tracker_lt_revision], [tracker_interface_age])
+m4_define([tracker_lt_age], [m4_eval(tracker_binary_age - tracker_interface_age)])
+m4_define([tracker_lt_current_minus_age],
+          [m4_eval(tracker_lt_current - tracker_lt_age)])
+
 # Define a string for the earliest version that this release has
 # backwards binary compatibility with for all interfaces a module
 # might. Unless we add module-only API with lower stability
@@ -61,6 +70,18 @@ AC_SUBST(TRACKER_BINARY_VERSION)
 
 AC_SUBST(PACKAGE_URL, [http://www.tracker-project.org])
 
+# libtool versioning
+LT_RELEASE=tracker_lt_release
+LT_CURRENT=tracker_lt_current
+LT_REVISION=tracker_lt_revision
+LT_AGE=tracker_lt_age
+LT_CURRENT_MINUS_AGE=tracker_lt_current_minus_age
+AC_SUBST(LT_RELEASE)
+AC_SUBST(LT_CURRENT)
+AC_SUBST(LT_REVISION)
+AC_SUBST(LT_AGE)
+AC_SUBST(LT_CURRENT_MINUS_AGE)
+
 # Checks for programs.
 AC_PROG_CC
 AC_PROG_LN_S


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