[Spice-devel,1/2] configure.ac: highlight current, revision and age

Submitted by Alon Levy on June 12, 2012, 11:23 a.m.

Details

Message ID 1339500213-24770-1-git-send-email-alevy@redhat.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Alon Levy June 12, 2012, 11:23 a.m.
Move to the top so anyone changing the library version will have a
higher likelihood of noticing them and thinking if they need changes as
well. Added the rules, copied from libtool's info page, as a reminder.
---
 configure.ac |   35 ++++++++++++++++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/configure.ac b/configure.ac
index 66f9d12..f4872c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,8 +1,41 @@ 
 AC_PREREQ([2.57])
 
+# Making releases:
+#   SPICE_MICRO_VERSION += 1;
+#   SPICE_INTERFACE_AGE += 1;
+#   SPICE_BINARY_AGE += 1;
+# if any functions have been added, set SPICE_INTERFACE_AGE to 0.
+# if backwards compatibility has been broken,
+# set SPICE_BINARY_AGE and SPICE_INTERFACE_AGE to 0.
+
 m4_define([SPICE_MAJOR], 0)
 m4_define([SPICE_MINOR], 10)
 m4_define([SPICE_MICRO], 1)
+# See info libtool or http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
+# Here are the 6 rules: (rule 1 here just to avoid saying what I omitted)
+
+# 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 or changed since the last
+#    public release, then set AGE to 0.
+
+m4_define([SPICE_CURRENT], [1])
+m4_define([SPICE_REVISION], [0])
+m4_define([SPICE_AGE], [2])
 
 AC_INIT(spice, [SPICE_MAJOR.SPICE_MINOR.SPICE_MICRO], [], spice)
 
@@ -33,7 +66,7 @@  AC_FUNC_ALLOCA
 
 AC_DEFINE([__STDC_FORMAT_MACROS],[],[Force definition of format macros for C++])
 
-SPICE_LT_VERSION=m4_format("%d:%d:%d", 1, 0, 2)
+SPICE_LT_VERSION=m4_format("%d:%d:%d", SPICE_CURRENT, SPICE_REVISION, SPICE_AGE)
 AC_SUBST(SPICE_LT_VERSION)
 
 # Check for the CPU we are using

Comments

On Tue, Jun 12, 2012 at 02:23:32PM +0300, Alon Levy wrote:
> Move to the top so anyone changing the library version will have a
> higher likelihood of noticing them and thinking if they need changes as
> well. Added the rules, copied from libtool's info page, as a reminder.
> ---
>  configure.ac |   35 ++++++++++++++++++++++++++++++++++-
>  1 file changed, 34 insertions(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 66f9d12..f4872c1 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1,8 +1,41 @@
>  AC_PREREQ([2.57])
>  
> +# Making releases:
> +#   SPICE_MICRO_VERSION += 1;
> +#   SPICE_INTERFACE_AGE += 1;
> +#   SPICE_BINARY_AGE += 1;

Unless I'm missing something, those 3 variable names don't
correspond to the names you actually used later ???

>  m4_define([SPICE_MICRO], 1)

> +m4_define([SPICE_CURRENT], [1])
> +m4_define([SPICE_REVISION], [0])
> +m4_define([SPICE_AGE], [2])


Regards,
Daniel