branch: development commit 3060c0adf3cd4f0e35daa9cef8aa83ab5cf88489 Author: Ileana Dumitrescu <ileanadumitresc...@gmail.com> AuthorDate: Thu Oct 24 20:43:03 2024 +0300
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. --- tests/destdir.at | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/tests/destdir.at b/tests/destdir.at index f109f149..df0d8ba8 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])