about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2022-11-14 19:57:35 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2022-11-14 19:57:35 +0000
commitb49f36cbb54909fbae5a1f55f5ec86e053acc2c1 (patch)
treef1679ced6ad48dac28dee7a2e19a5af28a59d406 /lib
parentb71065643f0631dcb5f7a216be30954ed20e4b19 (diff)
downloadnetpbm-mirror-b49f36cbb54909fbae5a1f55f5ec86e053acc2c1.tar.gz
netpbm-mirror-b49f36cbb54909fbae5a1f55f5ec86e053acc2c1.tar.xz
netpbm-mirror-b49f36cbb54909fbae5a1f55f5ec86e053acc2c1.zip
Make library minor number 100 + Netpbm minor number so it is higher than previous ones in Major 11
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4467 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile26
1 files changed, 24 insertions, 2 deletions
diff --git a/lib/Makefile b/lib/Makefile
index d7dfc993..5040e40f 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -99,8 +99,30 @@ libpbm3.o: CFLAGS_TARGET+=$(CFLAGS_SSE)
 $(LIBOBJECTS): %.o: %.c importinc
 	$(CC) -c $(INCLUDES) $(CFLAGS_ALL) -o $@ $<
 
-MAJ = 11
-MIN = $(NETPBM_MINOR_RELEASE)
+# The major number increases when there is a non-backward-compatible change
+# to the library at the binary level, meaning any client of the library needs
+# to keep using the old library until it has been recompiled for the new
+# library.  We try very hard never to lose backward compatibility at the
+# source level, which would mean the client source code has to be modified
+# before it can use the new library.
+#
+# The major number might seem like it corresponds to the major version number
+# of Netpbm, but it does not.  It is independent.
+#
+# Adding functions is backward compatible, so does not require a major number
+# change.
+#
+# The minor number must always increase within a major number.
+#
+# It is convenient to have the minor number equal to the minor version number
+# of Netpbm, but when we changed the Netpbm major version number from 10 to 11
+# just to keep the minor version number 2 digits, we had to continue
+# increasing the library minor number, so we went to 100 + minor version
+# number.  If we ever increase the major number to 12, we can go back to using
+# the minor version number for the library minor number.
+
+MAJ := 11
+$(eval MIN:=$(shell echo $$((100+$(NETPBM_MINOR_RELEASE)))))
 
 SONAME = libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ)