diff mbox series

[04/11] libpcre: use libtool to install test binaries

Message ID 20260109131130.3006446-4-ross.burton@arm.com
State New
Headers show
Series [01/11] libusb1: use libtool to install test binaries | expand

Commit Message

Ross Burton Jan. 9, 2026, 1:11 p.m. UTC
If libtool builds a binary it's best to use libtool to install it, as
otherwise you might install a wrapper script or need to make assumptions
about where libtool has put the real binary (as this isn't always .libs)

Also use install instead of cp to install more files.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/recipes-support/libpcre/libpcre_8.45.bb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/meta/recipes-support/libpcre/libpcre_8.45.bb b/meta/recipes-support/libpcre/libpcre_8.45.bb
index 67327065e4..c5ecbd8cf2 100644
--- a/meta/recipes-support/libpcre/libpcre_8.45.bb
+++ b/meta/recipes-support/libpcre/libpcre_8.45.bb
@@ -59,11 +59,11 @@  do_install_ptest() {
 	t=${D}${PTEST_PATH}
 	cp ${UNPACKDIR}/Makefile $t
 	cp -r ${S}/testdata $t
-	for i in pcre_stringpiece_unittest pcregrep pcretest; \
-	  do cp ${B}/.libs/$i $t; \
+	for i in pcre_stringpiece_unittest pcregrep pcretest; do
+		${B}/libtool --mode=install install ${B}/$i $t/
 	done
-	for i in RunTest RunGrepTest test-driver; \
-	  do cp ${S}/$i $t; \
+	for i in RunTest RunGrepTest test-driver; do
+		install ${S}/$i $t
 	done
 	# Skip the fr_FR locale test. If the locale fr_FR is found, it is tested.
 	# If not found, the test is skipped. The test program assumes fr_FR is non-UTF-8