make/install-lib.sh

Tue, 11 Nov 2025 18:15:42 +0100

author
Mike Becker <universe@uap-core.de>
date
Tue, 11 Nov 2025 18:15:42 +0100
changeset 1486
717e472f18d9
parent 1484
d72725216f37
permissions
-rwxr-xr-x

tighten the test expectation for cx_array_reserve() after the recent change

1471
2309b553c604 install shared libs with a new install-lib script, with variants for normal unix and macos - fixes #752 broken macos dylib support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1 #!/bin/sh
2309b553c604 install shared libs with a new install-lib script, with variants for normal unix and macos - fixes #752 broken macos dylib support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
2
2309b553c604 install shared libs with a new install-lib script, with variants for normal unix and macos - fixes #752 broken macos dylib support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
3 if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ] || [ -z "$4" ] ; then
1484
d72725216f37 add DESTDIR support
Mike Becker <universe@uap-core.de>
parents: 1472
diff changeset
4 echo "Usage: $0 <src> <libdir> <version> <major_version> [destdir]"
1471
2309b553c604 install shared libs with a new install-lib script, with variants for normal unix and macos - fixes #752 broken macos dylib support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
5 exit 1
2309b553c604 install shared libs with a new install-lib script, with variants for normal unix and macos - fixes #752 broken macos dylib support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
6 fi
2309b553c604 install shared libs with a new install-lib script, with variants for normal unix and macos - fixes #752 broken macos dylib support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
7
2309b553c604 install shared libs with a new install-lib script, with variants for normal unix and macos - fixes #752 broken macos dylib support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
8 SRC=$1
2309b553c604 install shared libs with a new install-lib script, with variants for normal unix and macos - fixes #752 broken macos dylib support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
9 LIB=$(basename $1)
1484
d72725216f37 add DESTDIR support
Mike Becker <universe@uap-core.de>
parents: 1472
diff changeset
10 LIBDIR=$5$2
1471
2309b553c604 install shared libs with a new install-lib script, with variants for normal unix and macos - fixes #752 broken macos dylib support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
11 LIBVERSION=$3
2309b553c604 install shared libs with a new install-lib script, with variants for normal unix and macos - fixes #752 broken macos dylib support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
12 LIBVERSION_MAJOR=$4
2309b553c604 install shared libs with a new install-lib script, with variants for normal unix and macos - fixes #752 broken macos dylib support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
13
1472
c48cf649c10f fix install-lib.sh - relates #752
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 1471
diff changeset
14 cp -f "$SRC" "$LIBDIR/$LIB.$LIBVERSION"
1471
2309b553c604 install shared libs with a new install-lib script, with variants for normal unix and macos - fixes #752 broken macos dylib support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
15
1472
c48cf649c10f fix install-lib.sh - relates #752
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 1471
diff changeset
16 rm -f "$LIBDIR/$LIB.$LIBVERSION_MAJOR"
c48cf649c10f fix install-lib.sh - relates #752
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 1471
diff changeset
17 rm -f "$LIBDIR/$LIB"
c48cf649c10f fix install-lib.sh - relates #752
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 1471
diff changeset
18 ln -s "$LIB.$LIBVERSION" "$LIBDIR/$LIB.$LIBVERSION_MAJOR"
c48cf649c10f fix install-lib.sh - relates #752
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 1471
diff changeset
19 ln -s "$LIB.$LIBVERSION_MAJOR" "$LIBDIR/$LIB"

mercurial