summaryrefslogtreecommitdiffstats
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2009-06-23 22:02:10 +0100
committerRichard W.M. Jones <rjones@redhat.com>2009-06-23 22:02:10 +0100
commitd3270cfadd3416bd9961a2c6fb1cc131c43979da (patch)
treee56dd5040a1b90d99ac8e5f27229920527028fa2 /src/Makefile.am
parentd2c0ee0ff7a9afdcdc1605dd464760f98d1b57d7 (diff)
downloadlibguestfs-d3270cfadd3416bd9961a2c6fb1cc131c43979da.tar.gz
libguestfs-d3270cfadd3416bd9961a2c6fb1cc131c43979da.tar.xz
libguestfs-d3270cfadd3416bd9961a2c6fb1cc131c43979da.zip
Implement libtool library versioning.
Use maximum proc_nr (MAX_PROC_NR) as a surrogate for the library ABI version, resulting in version numbers such as libguestfs.so.0.<MAX_PROC_NR>.0 for the final library. Add ABI guarantee to the documentation.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am44
1 files changed, 43 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index c310c9c4..6b1088ca 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -25,7 +25,49 @@ include_HEADERS = guestfs.h guestfs-actions.h guestfs-structs.h
lib_LTLIBRARIES = libguestfs.la
-libguestfs_la_LDFLAGS = -version-info 0:0:0
+# From the libtool info file, with comments:
+#
+# | 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').
+#
+# [So it seems like we should always update the middle 'R' field
+# for any release.]
+#
+# | 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.
+#
+# [These two rules seem to mean that if any change is made to the
+# generator, we should increment C and A, and set R to 0, so:
+# C+1:0:A+1.]
+#
+# | 6. If any interfaces have been removed since the last public release,
+# | then set AGE to 0.
+#
+# [Our ABI guarantee means we won't remove interfaces except in
+# very exceptional circumstances.]
+#
+# The maximum proc number (see guestfs_protocol.x:guestfs_procedure) is
+# a mostly accurate stand-in for C & A in rules 5 & 6, so we use that. It
+# is always incremented when we add a new appliance interface, and easy to
+# calculate.
+#
+# The middle number is hard to increment-and-reset as described in rules
+# 4 & 5, so for the moment it is always set to 0.
+#
+# Note that this scheme means the real library version will always be
+# 'libguestfs.so.0.$(MAX_PROC_NR).0'.
+
+libguestfs_la_LDFLAGS = -version-info $(MAX_PROC_NR):0:$(MAX_PROC_NR)
libguestfs_la_SOURCES = \
guestfs.c \
guestfs.h \