[libgit2-glib] Add Libtool versioning



commit 4cf61aa096e821f18018ffb025ed9fdfb4d76b08
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Apr 19 21:52:37 2013 +0200

    Add Libtool versioning
    
    The same way as GtkSourceView.

 configure.ac             | 21 +++++++++++++++++++++
 libgit2-glib/Makefile.am |  7 +++++--
 2 files changed, 26 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index d62594d..3fd85a7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,6 +10,27 @@ AC_INIT([libgit2-glib],
         [http://bugzilla.gnome.org/enter_bug.cgi?product=libgit2-glib],
         [libgit2-glib])
 
+# Libtool versioning
+#
+# For development releases, keep the same numbers.
+#
+# For stable releases, apply the following algorithm step by step:
+# 1. If the library source code has changed at all since the last
+#    update, then increment REVISION.
+# 2. If any exported functions or data have been added, removed, or
+#    changed since the last update, increment CURRENT and set REVISION
+#    to 0.
+# 3. If any exported functions or data have been added since the last
+#    public release, increment AGE.
+# 4. If any exported functions or data have been removed since the last
+#    public release, set AGE to 0.
+
+LIBGIT2_GLIB_LT_CURRENT=0
+LIBGIT2_GLIB_LT_REVISION=0
+LIBGIT2_GLIB_LT_AGE=0
+LIBGIT2_GLIB_LT_VERSION="$LIBGIT2_GLIB_LT_CURRENT:$LIBGIT2_GLIB_LT_REVISION:$LIBGIT2_GLIB_LT_AGE"
+AC_SUBST(LIBGIT2_GLIB_LT_VERSION)
+
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_SRCDIR([libgit2-glib/ggit-repository.c])
 AC_CONFIG_MACRO_DIR([m4])
diff --git a/libgit2-glib/Makefile.am b/libgit2-glib/Makefile.am
index a5c5a22..4d43eb4 100644
--- a/libgit2-glib/Makefile.am
+++ b/libgit2-glib/Makefile.am
@@ -9,8 +9,11 @@ INCLUDES =                                                             \
        -DDATADIR=\""$(datadir)"\"                                      \
        -DLIBDIR=\""$(libdir)"\"
 
-libgit2_glib_1_0_la_LDFLAGS = \
-       -export-dynamic -no-undefined -export-symbols-regex "^[^_].*"
+libgit2_glib_1_0_la_LDFLAGS =                          \
+       -version-info $(LIBGIT2_GLIB_LT_VERSION)        \
+       -export-dynamic                                 \
+       -no-undefined                                   \
+       -export-symbols-regex "^[^_].*"
 
 libgit2_glib_1_0_la_LIBADD = $(LIBGIT2_GLIB_LIBS)
 


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