Chinaunix首页 | 论坛 | 博客
  • 博客访问: 374104
  • 博文数量: 53
  • 博客积分: 1411
  • 博客等级: 上尉
  • 技术积分: 701
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-04 14:40
文章分类

全部博文(53)

文章存档

2011年(6)

2010年(20)

2009年(18)

2008年(9)

我的朋友

分类: LINUX

2010-04-20 20:30:50

Updating library version information

If you want to use libtool's versioning system, then you must specify the version information to libtool using the -version-info flag during link mode (see ).

This flag accepts an argument of the form ‘current[:revision[:age]]’. So, passing -version-info 3:12:1 sets current to 3, revision to 12, and age to 1.

If either revision or age are omitted, they default to 0. Also note that age must be less than or equal to the current interface number.

Here are a set of rules to help you update your library version information:

  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.

Never try to set the interface numbers so that they correspond to the release number of your package. This is an abuse that only fosters misunderstanding of the purpose of library versions. Instead, use the -release flag (see ), but be warned that every release of your package will not be binary compatible with any other release.

阅读(2194) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~