From 5554266c612b7208d2fa96a7325da27eb0d9a558 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Fri, 19 Mar 1999 16:54:20 +0000 Subject: [PATCH] * tests/noinst-link.test: new test * tests/Makefile.am (TESTS): added noinst-link.test * doc/libtool.texi: document it --- ChangeLog | 6 ++++++ doc/libtool.texi | 5 +++++ tests/Makefile.am | 2 +- tests/noinst-link.test | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 44 insertions(+), 1 deletion(-) create mode 100755 tests/noinst-link.test diff --git a/ChangeLog b/ChangeLog index be7645292..f5355fea5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1999-03-19 Alexandre Oliva + + * tests/noinst-link.test: new test + * tests/Makefile.am (TESTS): added noinst-link.test + * doc/libtool.texi: document it + 1999-03-18 Thomas Tanner * NEWS: improved support for BeOS and Cygwin diff --git a/doc/libtool.texi b/doc/libtool.texi index c205fa83a..e421adc80 100644 --- a/doc/libtool.texi +++ b/doc/libtool.texi @@ -3150,6 +3150,11 @@ executables}. This test checks the conditions under which your system linker hardcodes the library location, and guarantees that they correspond to libtool's own notion of how your linker behaves. +@item noinst-link.test +@pindex noinst-link.test +Checks whether libtool will not try to link with a previously installed +version of a library when it should be linking with a just-built one. + @item link.test @pindex link.test This test guarantees that linking directly against a non-libtool static diff --git a/tests/Makefile.am b/tests/Makefile.am index 25be7a3e6..1e43e5d6a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -16,7 +16,7 @@ TESTS = cdemo-static.test cdemo-make.test cdemo-exec.test \ demo-inst.test demo-unst.test \ cdemo-shared.test cdemo-make.test cdemo-exec.test \ demo-shared.test demo-make.test demo-exec.test demo-inst.test \ - hardcode.test build-relink.test demo-unst.test \ + hardcode.test build-relink.test noinst-link.test demo-unst.test \ mdemo-shared.test mdemo-make.test mdemo-exec.test \ mdemo-inst.test mdemo-unst.test \ assign.test link.test link-2.test nomode.test \ diff --git a/tests/noinst-link.test b/tests/noinst-link.test new file mode 100755 index 000000000..b730489d5 --- /dev/null +++ b/tests/noinst-link.test @@ -0,0 +1,32 @@ +#! /bin/sh +# noinst-link.test - make sure we do not link with an installed +# library when an uninstalled one is to be used + +# Test script header. +need_prefix=yes +if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes +fi +. $srcdir/defs || exit 1 + +# Check that things are built. +if test -f $prefix/lib/libhello.la && cd ../demo; then : +else + echo "You must run demo-inst.test before $0" 1>&2 + exit 77 +fi + +echo "removing libhello.la and hell from ../demo" +rm -f libhello.la hell + +echo "linking hell with a broken ../demo/libhello.la" +if $make hell libhello_la_OBJECTS=hello.lo; then + echo "= Succeeded: this means the installed library was used, which is wrong" + status=1 +fi + +rm -f libhello.la hell + +exit $status -- 2.47.3