From: Ralf Wildenhues Date: Mon, 22 Nov 2004 15:50:10 +0000 (+0000) Subject: * config/ltmain.m4sh (func_mode_link), tests/objectlist.test: X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=883e0e10e03912680d2237418b5c1c54a37b1a7e;p=thirdparty%2Flibtool.git * config/ltmain.m4sh (func_mode_link), tests/objectlist.test: Make sure the argument to `-objectlist' may contain spaces. --- diff --git a/ChangeLog b/ChangeLog index 3cdc25349..60fc86379 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-11-22 Ralf Wildenhues + + * config/ltmain.m4sh (func_mode_link), tests/objectlist.test: + Make sure the argument to `-objectlist' may contain spaces. + 2004-11-19 Gary V. Vaughan * config/m4general.m4sh, config/mailnotify.m4sh, diff --git a/config/ltmain.m4sh b/config/ltmain.m4sh index 7f6100602..7d8175f7c 100644 --- a/config/ltmain.m4sh +++ b/config/ltmain.m4sh @@ -2292,7 +2292,7 @@ func_mode_link () if test -f "$arg"; then save_arg=$arg moreargs= - for fil in `cat $save_arg` + for fil in `cat "$save_arg"` do # moreargs="$moreargs $fil" arg=$fil diff --git a/tests/objectlist.test b/tests/objectlist.test index 35325376e..9b471a885 100755 --- a/tests/objectlist.test +++ b/tests/objectlist.test @@ -1,6 +1,6 @@ #! /bin/sh # objectlist.test - make sure that a nonexisting objectlist file is -# properly mentioned +# properly mentioned and that the argument may contain spaces. # Copyright (C) 2003, 2004 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO @@ -28,10 +28,19 @@ linkresult=`$LIBTOOL -n --mode=link $CC -objectlist nonexistant 2>&1` test $? -eq 0 && exit $EXIT_FAILURE -echo ".$linkresult." echo "$linkresult" | ${EGREP} "nonexistant" >/dev/null 2>&1 && { func_msg "$progname: error message contains -objectlist argument as expected" - exit $EXIT_SUCCESS -} +} || exit $EXIT_FAILURE -exit $EXIT_FAILURE + +objlist="object list with spaces" +: > "$objlist" +linkresult=`$LIBTOOL -n --mode=link $CC -o a.out -objectlist "$objlist" 2>&1` +rm -f "$objlist" + +echo "$linkresult" | ${EGREP} "spaces" >/dev/null 2>&1 && { + func_msg "$progname: -objectlist with spaces in filename not recognized." + exit $EXIT_FAILURE +} + +exit $EXIT_SUCCESS