65 lines
2.2 KiB
Diff
65 lines
2.2 KiB
Diff
From 5d1be02360cf2dc3b8b1c74eb629d50497ecd0dc Mon Sep 17 00:00:00 2001
|
|
From: Reuben Thomas <rrt@sc3d.org>
|
|
Date: Mon, 19 Aug 2019 19:54:17 +0100
|
|
Subject: [PATCH] Version the shared library (fix #22)
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
---
|
|
configure.ac | 23 +++++++++++++++++++++++
|
|
src/Makefile.am | 2 +-
|
|
2 files changed, 24 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 5385584..b0415c9 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -10,6 +10,29 @@ AM_INIT_AUTOMAKE
|
|
AC_CONFIG_MACRO_DIR(m4)
|
|
AC_CANONICAL_HOST
|
|
|
|
+dnl Release number rules:
|
|
+dnl This is derived from "Versioning" chapter of info libtool documentation.
|
|
+dnl Format is MAJOR:MINOR:MICRO
|
|
+dnl 4a) Increment major when removing or changing interfaces.
|
|
+dnl 4a) 5) Increment minor when adding interfaces.
|
|
+dnl 6) Set minor to zero when removing or changing interfaces.
|
|
+dnl 3) Increment micro when interfaces not changed at all,
|
|
+dnl only bug fixes or internal changes made.
|
|
+dnl 4b) Set micro to zero when adding, removing or changing interfaces.
|
|
+
|
|
+dnl First extract pieces from the version number string
|
|
+RECODE_MAJOR_VERSION=`echo $VERSION | awk -F. '{print $1}'`
|
|
+RECODE_MINOR_VERSION=`echo $VERSION | awk -F. '{print $2}'`
|
|
+RECODE_MICRO_VERSION=`echo $VERSION | awk -F. '{print $3}'`
|
|
+
|
|
+dnl Version info for libraries = CURRENT:REVISION:AGE
|
|
+RECODE_SONUM=$RECODE_MAJOR_VERSION
|
|
+AGE=$RECODE_MINOR_VERSION
|
|
+REVISION=$RECODE_MICRO_VERSION
|
|
+CURRENT=`expr $RECODE_SONUM + $AGE`
|
|
+VERSION_INFO=$CURRENT:$REVISION:$AGE
|
|
+AC_SUBST(VERSION_INFO)
|
|
+
|
|
AC_PROG_CC_C99
|
|
gl_EARLY
|
|
LT_INIT
|
|
diff --git a/src/Makefile.am b/src/Makefile.am
|
|
index 20b66c1..5821f94 100644
|
|
--- a/src/Makefile.am
|
|
+++ b/src/Makefile.am
|
|
@@ -54,7 +54,7 @@ recode_LDADD = librecode.la
|
|
librecode_la_SOURCES = charname.c combine.c fr-charname.c iconv.c \
|
|
names.c outer.c recode.c request.c strip-pool.c task.c $(ALL_STEPS) \
|
|
$(include_HEADERS) $(noinst_HEADERS) $(H_STEPS)
|
|
-librecode_la_LDFLAGS = -version-info 0:0:0
|
|
+librecode_la_LDFLAGS = -version-info $(VERSION_INFO)
|
|
librecode_la_LIBADD = ../lib/libgnu.la libmerged.la
|
|
|
|
libmerged_la_SOURCES = merged.c
|
|
--
|
|
2.21.0
|
|
|