From 72276572766915890129711b16907ef3065ac630 Mon Sep 17 00:00:00 2001 From: midipix Date: Mon, 23 Mar 2015 19:22:04 -0400 Subject: libtool: midipix targets: fix generation of import libraries. signed-off by Z. Gilboa; see copying.midipix (9cd0746c) for additional information. --- ltmain.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ltmain.sh b/ltmain.sh index ff28f7854..744264797 100644 --- a/ltmain.sh +++ b/ltmain.sh @@ -2332,17 +2332,19 @@ func_mode_install () # this only affects symbols prefixed by __emutls_[vt], which presumably # are only marked for export due to --export-all-symbols being the default. - grep -n 'IMPORTS' "$implib_ver_def_name" || imp_lines='all' + grep -vE '"$excluded_symbols"' "$implib_ver_def_name" | grep -v '\.' > "$implib_def_name" + imp_lines=`grep -n 'IMPORTS' "$implib_def_name"` - if [ "$imp_lines"x = allx ]; then - cp "$implib_ver_def_name" "$implib_exp_def_name" + if [ x"$imp_lines" = x ]; then + imp_lines=`wc -l "$implib_def_name"` + imp_lines=`echo "$imp_lines" | cut -d' ' -f1` else - grep -vE '"$excluded_symbols"' "$implib_ver_def_name" | grep -v '\.' > "$implib_def_name" - imp_lines=`grep -n 'IMPORTS' "$implib_def_name" | cut -d':' -f1` - imp_lines=`expr $imp_lines - 1` - head -n$imp_lines "$implib_def_name" > "$implib_exp_def_name" + imp_lines=`echo "$imp_lines" | cut -d':' -f1` + imp_lines=`expr $imp_lines - 1`; fi + head -n$imp_lines "$implib_def_name" > "$implib_exp_def_name" + "$host"-dlltool -d "$implib_exp_def_name" -D "$dso_name" -l "$implib_name" cp -t "$destdir" "$implib_name" ;; -- cgit v1.2.3