mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 13:46:32 +00:00
toolchain: copy_toolchain_lib_root: clarify logic
copy_toolchain_lib_root has slightly different logic depending on the type of library object: file or link. All actions related to links are not relevant in case you are working with a file. Hence, try to increase clarity by not executing unnecessary lines in the 'file' case. Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
eff1980194
commit
d34e02a657
@ -17,19 +17,17 @@ copy_toolchain_lib_root = \
|
|||||||
mkdir -p $(TARGET_DIR)/$${DESTDIR}; \
|
mkdir -p $(TARGET_DIR)/$${DESTDIR}; \
|
||||||
while true ; do \
|
while true ; do \
|
||||||
LIBNAME=`basename $${LIBPATH}`; \
|
LIBNAME=`basename $${LIBPATH}`; \
|
||||||
LINKTARGET=`readlink $${LIBPATH}` ; \
|
|
||||||
rm -fr $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \
|
rm -fr $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \
|
||||||
if test -h $${LIBPATH} ; then \
|
if test -h $${LIBPATH} ; then \
|
||||||
|
LINKTARGET=`readlink $${LIBPATH}` ; \
|
||||||
ln -sf `basename $${LINKTARGET}` $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME} ; \
|
ln -sf `basename $${LINKTARGET}` $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME} ; \
|
||||||
|
LIBPATH="`readlink -f $${LIBPATH}`"; \
|
||||||
elif test -f $${LIBPATH}; then \
|
elif test -f $${LIBPATH}; then \
|
||||||
$(INSTALL) -D -m0755 $${LIBPATH} $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \
|
$(INSTALL) -D -m0755 $${LIBPATH} $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \
|
||||||
|
break ; \
|
||||||
else \
|
else \
|
||||||
exit -1; \
|
exit -1; \
|
||||||
fi; \
|
fi; \
|
||||||
if test -z "$${LINKTARGET}" ; then \
|
|
||||||
break ; \
|
|
||||||
fi ; \
|
|
||||||
LIBPATH="`readlink -f $${LIBPATH}`"; \
|
|
||||||
done; \
|
done; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user