libtool-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Ileana Dumitrescu
Date: Wed, 20 Nov 2024 10:40:52 -0500 (EST)

branch: master
commit ad4b513fcab6c2f2e487d70aa08d3a355b560ef9
Author: Ileana Dumitrescu <ileanadumitrescu95@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])



reply via email to

[Prev in Thread] Current Thread [Next in Thread]