From: Ileana Dumitrescu Date: Thu, 24 Oct 2024 17:43:03 +0000 (+0300) Subject: libtool: Test trailing slash in destination X-Git-Tag: v2.5.4~27 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ad4b513fcab6c2f2e487d70aa08d3a355b560ef9;p=thirdparty%2Flibtool.git libtool: Test trailing slash in destination This test is added to ensure path comparisons pass when installing to a destination, specifically when there is a trailing slash in the destination. * tests/destdir.at: Add test for trailing slash in destination. --- diff --git a/tests/destdir.at b/tests/destdir.at index f109f149c..df0d8ba85 100644 --- a/tests/destdir.at +++ b/tests/destdir.at @@ -137,4 +137,45 @@ fi AT_CLEANUP +AT_SETUP([trailing slash in destination]) +AT_KEYWORDS([libtool]) + +AT_DATA([configure.ac], +[[ +AC_INIT([foo], [0]) +AM_INIT_AUTOMAKE([foreign]) +AC_PROG_CC +LT_INIT +AC_CONFIG_FILES([Makefile]) +AC_CONFIG_MACRO_DIRS([m4]) +AC_OUTPUT +]]) + +AT_DATA([Makefile.am], +[[ +lib_LTLIBRARIES = libbase.la +libbase_la_SOURCES = foo.c +# Path with trailing slash for test +bardir = /usr/lib/bar/extensions/ +bar_LTLIBRARIES = foo.la +foo_la_SOURCES = foo.c +foo_la_LDFLAGS = -module -avoid-version +foo_la_LIBADD = libbase.la +]]) + +AT_DATA([foo.c], +[[ +int unused; +]]) + +LT_AT_LIBTOOLIZE([--force --copy --install]) +LT_AT_AUTORECONF([--force --verbose --install]) +LT_AT_CONFIGURE([]) +# Use local 'tmp' directory as destination +sysroot=`pwd`/tmp +AT_CHECK([$MAKE], [0], [ignore], [ignore]) +AT_CHECK([$MAKE install DESTDIR=$sysroot], [0], [ignore], [ignore]) + +AT_CLEANUP + m4_popdef([_LT_DIRSETUP])