From 263d8b92705c2492473383da11aebb9f9265a06e Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Fri, 22 Nov 2013 17:04:51 +0200 Subject: [PATCH] Expand the FOO_LIBS vars to a list of the actual archives Thus the output can also be used in makefiles where a list of actual files is needed. Change-Id: I23396dc2e98c47b99cbf53926f247bd834119976 --- bin/lo-all-static-libs | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/bin/lo-all-static-libs b/bin/lo-all-static-libs index 1fd2e6e9b1bb..b363e67e4c9e 100755 --- a/bin/lo-all-static-libs +++ b/bin/lo-all-static-libs @@ -17,12 +17,25 @@ if test "$OS" != ANDROID -a "$OS" != IOS; then echo This script makes sense only in Android or iOS builds. fi +foolibs= +for var in EBOOK_LIBS FREEHAND_LIBS HUNSPELL_LIBS HYPHEN_LIB MYTHES_LIBS; do + dirs= + libs= + for i in `eval echo '$'$var`; do + case "$i" in + -L*) dirs="$dirs ${i#-L}";; + -l*) libs="$libs ${i#-l}";; + esac + done + for l in $libs; do + for d in $dirs; do + test -f $d/lib$l.a && foolibs="$foolibs $d/lib$l.a" + done + done +done + echo $INSTDIR/$LIBO_LIB_FOLDER/lib*.a \ - $EBOOK_LIBS \ - $FREEHAND_LIBS \ - $HUNSPELL_LIBS \ - $HYPHEN_LIB \ - $MYTHES_LIBS \ + $foolibs \ $WORKDIR/LinkTarget/StaticLibrary/lib*.a \ $WORKDIR/UnpackedTarball/icu/source/lib/*.a \ $WORKDIR/UnpackedTarball/lcms2/src/.libs/*.a \