]> git.saurik.com Git - wxWidgets.git/commitdiff
use libtool versioning of shared libs on Unix
authorVáclav Slavík <vslavik@fastmail.fm>
Mon, 4 Jul 2005 09:58:07 +0000 (09:58 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Mon, 4 Jul 2005 09:58:07 +0000 (09:58 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34810 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

build/bakefiles/common.bkl
build/bakefiles/version.bkl

index a6fe824348a549c61f44beb111e1313ba65b6857..65906d1ef91231a1d9bab2857e84743bce870963 100644 (file)
@@ -520,7 +520,9 @@ $(TAB)copy "$(DOLLAR)(InputPath)" $(SETUPHDIR)\wx\setup.h
         <dllname>$(WXDLLNAME)</dllname>
         <version>$(WX_VERSION)</version>
         <so_version>$(WXSOVERSION)</so_version>
-        <mac_version>$(WXMACVERSION)</mac_version>
+    
+        <!-- FIXME: until libtool scheme is implemented in bakefile -->
+        <ldflags cond="FORMAT=='autoconf'">$(WXMACVERSION_CMD)</ldflags>
 
         <!-- version info resources: -->
         <if cond="FORMAT not in ['rpmspec','wx24dsp']"> <!-- FIXME: fix for bkl-0.1.7 only, remove the cond later -->
index 3e030788dff3eb4750931f525d7aa06f3b00bd63..18e7dc3c8e9632964fe2650871ebf4048223e176 100644 (file)
@@ -7,11 +7,32 @@
     <!--                      Handling of binary compatiblity:              -->
     <!-- ================================================================== -->
 
-    <!-- this needs to be reset to 0 on beginning of stable series and
-         increment by one 1 every time binary incompatible change is made
-         (i.e. preferably never) -->
-    <set var="WX_BINARY_VERSION">0</set>
-    
+    <!--
+       We use libtool CURRENT:REVISION:AGE versioning scheme. Quoting libtool
+       documentation on how to handle the values:
+        
+       1. Start with version information of `0:0:0' for each libtool library.
+     
+       2. Update the version information only immediately before a public
+          release of your software.  More frequent updates are unnecessary,
+          and only guarantee that the current interface number gets larger
+          faster.
+     
+       3. If the library source code has changed at all since the last
+          update, then increment REVISION (`C:R:A' becomes `C:r+1:A').
+     
+       4. If any interfaces have been added, removed, or changed since the
+          last update, increment CURRENT, and set REVISION to 0.
+     
+       5. If any interfaces have been added since the last public release,
+          then increment AGE.
+     
+       6. If any interfaces have been removed since the last public release,
+          then set AGE to 0.
+    -->
+    <set var="WX_CURRENT">2</set>
+    <set var="WX_REVISION">0</set>
+    <set var="WX_AGE">2</set>
 
 
     <!-- ================================================================== -->
     </set>
 
     <set var="WX_STABLE_BRANCH">$(int(int(WXVER_MINOR) % 2 == 0))</set>
-    
+
+    <!-- in unstable branch, binary compat. changes with every release, check
+         for it: -->
+    <if cond="WX_STABLE_BRANCH=='0' and int(WX_CURRENT)!=int(WXVER_RELEASE)">
+        <error>Forgot to update WX_CURRENT/WX_REVISION/WX_AGE?</error>
+    </if>
     <set var="WXSOVERSION">
-        <if cond="WX_STABLE_BRANCH=='1'">$(WX_BINARY_VERSION).0.0</if>
-        <if cond="WX_STABLE_BRANCH=='0'">$(WXVER_RELEASE).0.0</if>
+        $(int(WX_CURRENT)-int(WX_AGE)).$(WX_AGE).$(WX_REVISION)
     </set>
-    <set var="WXMACVERSION">$(WX_VERSION)</set>
+
+    <!-- FIXME: until libtool scheme is implemented in bakefile -->
+    <set var="WXMACVERSION_CMD">
+        <if cond="PLATFORM_MACOSX=='1'">
+            -compatibility_version $(WX_AGE).0 -current_version $(WX_AGE).$(WX_REVISION)
+        </if>
+    </set>
+
     <set var="WXWIN32DLLVERSION">
         <if cond="WX_STABLE_BRANCH=='1'">$(WX_RELEASE_NODOT)</if>
         <if cond="WX_STABLE_BRANCH=='0'">$(WX_VERSION_NODOT)</if>