At Mon, 31 Mar 2003 05:52:47 +0900, Naofumi Yasufuku wrote: > > Hi, > > libtool uses '~' as IFS in some commands (ex. $archive_expsym_cmds), > so that win32 short name which includes '~' (ex. c:/progra~1/foo/...) > causes a problem. For example, if we want to build DLL which is linked > with -Lc:/progra~1/foo/lib -lbar, DLL build command fails. > > I think it can be solved by putting off the command list variable > expansion until its execution loop. >
This is the patch against the latest CVS HEAD. I've tested it under Cygwin/MinGW on my WinXP box. Could anyone test this patch? Regards, --Naofumi tilde-ifs.patch: ------------------------------------------------------------------------------- Index: ltmain.in =================================================================== RCS file: /cvsroot/libtool/libtool/ltmain.in,v retrieving revision 1.330 diff -u -r1.330 ltmain.in --- ltmain.in 29 Mar 2003 04:09:00 -0000 1.330 +++ ltmain.in 31 Mar 2003 12:56:19 -0000 @@ -2273,9 +2273,9 @@ else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' - eval cmds=\"$extract_expsyms_cmds\" - for cmd in $cmds; do + for cmd in $extract_expsyms_cmds; do IFS="$save_ifs" + eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done @@ -2286,9 +2286,9 @@ if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' - eval cmds=\"$old_archive_from_expsyms_cmds\" - for cmd in $cmds; do + for cmd in $old_archive_from_expsyms_cmds; do IFS="$save_ifs" + eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done @@ -3497,10 +3497,10 @@ $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols - eval cmds=\"$export_symbols_cmds\" save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do + for cmd in $export_symbols_cmds; do IFS="$save_ifs" + eval cmd=\"$cmd\" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" @@ -3617,19 +3617,20 @@ # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds else - eval cmds=\"$module_cmds\" + cmds=$module_cmds fi else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval cmds=\"$archive_expsym_cmds\" - else - eval cmds=\"$archive_cmds\" + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds fi fi - if test "X$skipped_export" != "X:" && len=`expr "X$cmds" : ".*"` && + eval cmds_eval=\"$cmds\" + if test "X$skipped_export" != "X:" && len=`expr "X$cmds_eval" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else @@ -3671,11 +3672,11 @@ # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + concat_cmds="\$reload_cmds \$objlist \$last_robj" else # All subsequent reloadable object files will link in # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" + concat_cmds="${concat_cmds}~\$reload_cmds \$objlist \$last_robj" fi last_robj=$output_objdir/$save_output-${k}.$objext k=`expr $k + 1` @@ -3688,7 +3689,7 @@ # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + concat_cmds="${concat_cmds}\$reload_cmds \$objlist \$last_robj" if ${skipped_export-false}; then $show "generating symbol list for \`$libname.la'" @@ -3696,7 +3697,7 @@ $run $rm $export_symbols libobjs=$output # Append the command to create the export file. - eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" + concat_cmds="${concat_cmds}~\$export_symbols_cmds" fi # Set up a command to remove the reloadale object files @@ -3714,6 +3715,7 @@ save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" + eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done @@ -3731,18 +3733,19 @@ # Do each of the archive commands. if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds else - eval cmds=\"$archive_cmds\" + cmds=$archive_cmds fi # Append the command to remove the reloadable object files # to the just-reset $cmds. - eval cmds=\"\$cmds~$rm $delfiles\" + cmds="${cmds}~\$rm \$delfiles" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" + eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done @@ -3893,10 +3896,10 @@ reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" - eval cmds=\"$reload_cmds\" save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do + for cmd in $reload_cmds; do IFS="$save_ifs" + eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done @@ -3929,10 +3932,10 @@ # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" - eval cmds=\"$reload_cmds\" save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do + for cmd in $reload_cmds; do IFS="$save_ifs" + eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done @@ -4904,11 +4907,12 @@ # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - eval cmds=\"$old_archive_from_new_cmds\" + cmds=$old_archive_from_new_cmds else - eval cmds=\"$old_archive_cmds\" + cmds=$old_archive_cmds - if len=`expr "X$cmds" : ".*"` && + eval cmds_eval=\"$cmds\" + if len=`expr "X$cmds_eval" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else @@ -4953,22 +4957,23 @@ RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + concat_cmds="${concat_cmds}\$old_archive_cmds" objlist= fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" + cmds=$concat_cmds else - eval cmds=\"\$concat_cmds~$old_archive_cmds\" + cmds="${concat_cmds}~\$old_archive_cmds" fi fi fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" + eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done @@ -5364,10 +5369,10 @@ # Do each command in the postinstall commands. lib="$destdir/$realname" - eval cmds=\"$postinstall_cmds\" save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do + for cmd in $postinstall_cmds; do IFS="$save_ifs" + eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done @@ -5586,10 +5591,10 @@ fi # Do each command in the postinstall commands. - eval cmds=\"$old_postinstall_cmds\" save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do + for cmd in $old_postinstall_cmds; do IFS="$save_ifs" + eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done @@ -5624,10 +5629,10 @@ for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. - eval cmds=\"$finish_cmds\" save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do + for cmd in $finish_cmds; do IFS="$save_ifs" + eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" @@ -5901,10 +5906,10 @@ if test "$mode" = uninstall; then if test -n "$library_names"; then # Do each command in the postuninstall commands. - eval cmds=\"$postuninstall_cmds\" save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do + for cmd in $postuninstall_cmds; do IFS="$save_ifs" + eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then @@ -5916,10 +5921,10 @@ if test -n "$old_library"; then # Do each command in the old_postuninstall commands. - eval cmds=\"$old_postuninstall_cmds\" save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do + for cmd in $old_postuninstall_cmds; do IFS="$save_ifs" + eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then -------------------------------------------------------------------------------
tilde-ifs.patch.gz
Description: Binary data
_______________________________________________ Libtool mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/libtool