[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
-objectlist argument with spaces
From: |
Ralf Wildenhues |
Subject: |
-objectlist argument with spaces |
Date: |
Mon, 22 Nov 2004 15:37:06 +0100 |
User-agent: |
Mutt/1.4.1i |
OK to apply?
2004-11-22 Ralf Wildenhues <address@hidden>
* config/ltmain.m4sh (func_mode_link), tests/objectlist.test:
Make sure the argument to `-objectlist' may contain spaces.
Index: config/ltmain.m4sh
===================================================================
RCS file: /cvsroot/libtool/libtool/config/ltmain.m4sh,v
retrieving revision 1.1.2.19
diff -u -r1.1.2.19 ltmain.m4sh
--- config/ltmain.m4sh 10 Nov 2004 10:13:13 -0000 1.1.2.19
+++ config/ltmain.m4sh 22 Nov 2004 14:31:23 -0000
@@ -2292,7 +2292,7 @@
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
Index: tests/objectlist.test
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/objectlist.test,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 objectlist.test
--- tests/objectlist.test 10 Nov 2004 10:13:13 -0000 1.1.2.1
+++ tests/objectlist.test 22 Nov 2004 14:31:23 -0000
@@ -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
- -objectlist argument with spaces,
Ralf Wildenhues <=