LIBSPATH is populated based on a find with a pattern that can look like:
libfoo*.so
and thus the output of the find will contain all file paths that match this
pattern.
Unfortunately, the name LIBSPATH suggests that only one entry is returned,
rather than possibly multiple.
As this code is quite complex, use the more accurate name LIBPATHS iso
LIBSPATH.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
$${ARCH_SYSROOT_DIR}/$${ARCH_LIB_DIR} \
$${ARCH_SYSROOT_DIR}/usr/$${ARCH_LIB_DIR} \
$${SUPPORT_LIB_DIR} ; do \
- LIBSPATH=`find $${dir} -maxdepth 1 -name "$${LIB}" 2>/dev/null` ; \
- if test -n "$${LIBSPATH}" ; then \
+ LIBPATHS=`find $${dir} -maxdepth 1 -name "$${LIB}" 2>/dev/null` ; \
+ if test -n "$${LIBPATHS}" ; then \
break ; \
fi \
done ; \
mkdir -p $(TARGET_DIR)/$${DESTDIR}; \
- for LIBPATH in $${LIBSPATH} ; do \
+ for LIBPATH in $${LIBPATHS} ; do \
while true ; do \
LIBNAME=`basename $${LIBPATH}`; \
LIBDIR=`dirname $${LIBPATH}` ; \