From 62c58a0f0b016164382d2f6f56092a1605cdf829 Mon Sep 17 00:00:00 2001 From: midipix Date: Mon, 23 Mar 2015 19:35:17 -0400 Subject: libtool: midipix targets: fix generation of import libraries. signed-off by Z. Gilboa; see copying.midipix (9cd0746c) for additional information. --- libtool.midipix | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/libtool.midipix b/libtool.midipix index e1d370a..3cb25ed 100755 --- a/libtool.midipix +++ b/libtool.midipix @@ -2842,17 +2842,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