Separate package version from libtool -version-info.
authorMichael Andres <ma@suse.de>
Sat, 5 Aug 2006 00:17:25 +0000 (00:17 +0000)
committerMichael Andres <ma@suse.de>
Sat, 5 Aug 2006 00:17:25 +0000 (00:17 +0000)
See VERSION file for details.
Set version 2.0.0

VERSION
configure.ac

diff --git a/VERSION b/VERSION
index 8dc35d4..9fd7fc1 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,44 +2,52 @@ dnl ==================================================
 dnl Versioning
 dnl ==========
 dnl
-dnl CURRENT    The most recent interface number that this library implements.
+dnl MAJOR      Major number for this branch.
 dnl
-dnl REVISION   The implementation number of the current interface.
+dnl MINOR      The most recent interface number this
+dnl            library implements.
 dnl
-dnl AGE        The difference between the newest and oldest interfaces that this
-dnl            library implements.
-dnl            In other words, the library implements all the interface numbers
-dnl            in the range from number 'CURRENT - AGE' to 'CURRENT'.
+dnl COMPATMINOR        The latest binary compatible minor number
+dnl            this library implements.
 dnl
-dnl 1) Start with version information of `0:0:0' for each libtool library.
+dnl PATCH      The implementation number of the current interface.
+dnl
+dnl
+dnl - The package VERSION will be MAJOR.MINOR.PATCH.
+dnl
+dnl - Libtool's -version-info will be derived from MAJOR, MINOR, PATCH
+dnl   and COMPATMINOR (see configure.ac).
+dnl
+dnl - Changing MAJOR always breaks binary compatibility.
+dnl
+dnl - Changing MINOR doesn't break binary compatibility by default.
+dnl   Only if COMPATMINOR is changed as well.
+dnl
+dnl
+dnl 1) After branching from TRUNK increment TRUNKs MAJOR and
+dnl    start with version `MAJOR.0.0' and also set COMPATMINOR to 0.
 dnl
 dnl 2) Update the version information only immediately before a public release
 dnl    of your software. More frequent updates are unnecessary, and only guarantee
 dnl    that the current interface number gets larger faster.
 dnl
 dnl 3) If the library source code has changed at all since the last update,
-dnl    then increment revision (`c:r:a' becomes `c:r+1:a').
+dnl    then increment PATCH.
 dnl
 dnl 4) If any interfaces have been added, removed, or changed since the last
-dnl    update, increment current, and set revision to 0.
+dnl    update, increment MINOR, and set PATCH to 0.
 dnl
 dnl 5) If any interfaces have been added since the last public release, then
-dnl    increment age.
+dnl    leave COMPATMINOR unchanged. (binary compatible change)
 dnl
 dnl 6) If any interfaces have been removed since the last public release, then
-dnl    set age to 0.
+dnl    set COMPATMINOR to MINOR. (binary incompatible change)
 dnl
 dnl ==================================================
-
-
-dnl !!! Next time LIBZYPP_CURRENT is INCREMENTED, change
-dnl     configure.ac:
-dnl
-dnl - AC_INIT([zypp], [LIBZYPP_CURRENT.LIBZYPP_REVISION.LIBZYPP_AGE])
-dnl + AC_INIT([zypp], [LIBZYPP_CURRENT.LIBZYPP_AGE.LIBZYPP_REVISION])
-dnl
-
-m4_define([LIBZYPP_CURRENT],   [1])
-m4_define([LIBZYPP_REVISION],  [2])
-m4_define([LIBZYPP_AGE],       [0])
+m4_define([LIBZYPP_MAJOR],      [2])
+dnl ==================================================
+m4_define([LIBZYPP_MINOR],      [0])
+m4_define([LIBZYPP_COMPATMINOR], [0])
+dnl ==================================================
+m4_define([LIBZYPP_PATCH],      [0])
 dnl ==================================================
index 9b3ef1f..25caafc 100644 (file)
@@ -1,7 +1,7 @@
 dnl Process this file with autoconf to produce a configure script.
 dnl ==================================================
 m4_include([VERSION])
-AC_INIT([zypp], [LIBZYPP_CURRENT.LIBZYPP_REVISION.LIBZYPP_AGE])
+AC_INIT([zypp], [LIBZYPP_MAJOR.LIBZYPP_MINOR.LIBZYPP_PATCH])
 dnl ==================================================
 AC_CONFIG_SRCDIR(zypp/Makefile.am)
 
@@ -13,10 +13,14 @@ AM_INIT_AUTOMAKE(foreign dist-bzip2 no-dist-gzip tar-ustar)
 AM_CONFIG_HEADER(config.h)
 
 dnl ==================================================
-
-LIBZYPP_VERSION_INFO="-version-info LIBZYPP_CURRENT:LIBZYPP_REVISION:LIBZYPP_AGE"
+dnl The calculations below allows us to include the minor version
+dnl in soname without to break the compatibility (soname) flags of
+dnl the library by default. (Thanx to Marius)
+dnl See VERSION file for further details.
+LIBZYPP_CURRENT=$((LIBZYPP_MAJOR * 100 + LIBZYPP_MINOR))
+LIBZYPP_AGE=$((LIBZYPP_MINOR - LIBZYPP_COMPATMINOR))
+LIBZYPP_VERSION_INFO="-version-info $LIBZYPP_CURRENT:LIBZYPP_PATCH:$LIBZYPP_AGE"
 AC_SUBST(LIBZYPP_VERSION_INFO)
-
 dnl ==================================================
 
 # libzypp compile time features/option tags,
@@ -30,7 +34,7 @@ AC_SUBST(ZYPP_CFLAGS)
 
 dnl ==================================================
 
-CXXFLAGS="${CXXFLAGS} -g -O2 -Wall -Wformat"
+CXXFLAGS="${CXXFLAGS} -g -pg -O2 -Wall -Wformat"
 AC_SYS_LARGEFILE
 if test "$enable_largefile" != no ; then
        enable_largefile=yes
@@ -282,6 +286,7 @@ Configuration:
 
   PACKAGE:              ${PACKAGE}
   VERSION:              ${VERSION}
+  LIBZYPP_VERSION_INFO  ${LIBZYPP_VERSION_INFO}
 
   FEATURES:             ${ZYPP_FEATURES}